CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Question on book "Beginning Perl" and running examples

 

First page Previous page 1 2 Next page Last page  View All


FishMonger
Veteran / Moderator

Oct 18, 2013, 2:57 PM

Post #26 of 34 (1002 views)
Re: [OB53] Question on book "Beginning Perl" and running examples [In reply to] Can't Post

The backslash is the escape character and when doubled up in the .reg file, it escapes the backslash used in the path. If you're manually editing the registry, then you don't need/want to use double backslashes.


OB53
Novice

Oct 18, 2013, 3:26 PM

Post #27 of 34 (999 views)
Re: [FishMonger] Question on book "Beginning Perl" and running examples [In reply to] Can't Post

So then it should be like this: "C:\strawberry\perl\bin\perl.exe\" \"%1\" %*"


(This post was edited by OB53 on Oct 18, 2013, 3:28 PM)


OB53
Novice

Oct 18, 2013, 3:39 PM

Post #28 of 34 (993 views)
Re: [OB53] Question on book "Beginning Perl" and running examples [In reply to] Can't Post

No go, at least now I get a flashing cursor. not at c prompt though. A control+C gave me this: "^vTerminating on signal SIGINT(2)", which I never got before.


OB53
Novice

Oct 18, 2013, 4:48 PM

Post #29 of 34 (985 views)
Re: [OB53] Question on book "Beginning Perl" and running examples [In reply to] Can't Post

any suggestions as to where to go from here?


FishMonger
Veteran / Moderator

Oct 18, 2013, 6:19 PM

Post #30 of 34 (975 views)
Re: [OB53] Question on book "Beginning Perl" and running examples [In reply to] Can't Post

You don't need/want to escape the quotes.

It should be:
"C:\strawberry\perl\bin\perl.exe" "%1" %*

or
"C:\strawberry\perl\bin\perl.exe" "%1"

The first one is what is configured on my work computer and the second one is what I have on my laptop.


OB53
Novice

Oct 18, 2013, 8:40 PM

Post #31 of 34 (971 views)
Re: [FishMonger] Question on book "Beginning Perl" and running examples [In reply to] Can't Post

Neither one works. I have a questions though. Is this like the old PATH statement in windows 3.1? Reason I ask is I have no directory of "C:\Strawberry". And you say that on your work PC you have "C:\Strawberry\perl\bin\perl.exe" "%1" %* is that correct in having the last % not in quotes but rather as %*
BTW my working path for perl is "C:\Perl64\perl\bin\perl.exe"


FishMonger
Veteran / Moderator

Oct 18, 2013, 9:29 PM

Post #32 of 34 (963 views)
Re: [OB53] Question on book "Beginning Perl" and running examples [In reply to] Can't Post

It appears that you're not reading some of my posts.

I mentioned several times that you need to adjust the path in my posts to match your perl installation.


FishMonger
Veteran / Moderator

Oct 19, 2013, 11:30 AM

Post #33 of 34 (955 views)
Re: [OB53] Question on book "Beginning Perl" and running examples [In reply to] Can't Post


In Reply To
Neither one works. I have a questions though. Is this like the old PATH statement in windows 3.1? Reason I ask is I have no directory of "C:\Strawberry". And you say that on your work PC you have "C:\Strawberry\perl\bin\perl.exe" "%1" %* is that correct in having the last % not in quotes but rather as %*
BTW my working path for perl is "C:\Perl64\perl\bin\perl.exe"


The registry value should point to your working path to perl i.e.,
"C:\Perl64\perl\bin\perl.exe" "%1"

If that doesn't work for you, then your perl installation is broken and you should do a complete uninstall/reinstall of perl.


OB53
Novice

Oct 26, 2013, 3:08 PM

Post #34 of 34 (917 views)
Re: [FishMonger] Question on book "Beginning Perl" and running examples [In reply to] Can't Post

Well, after a couple uninstalls and reinstalls, I got to the bottom of my problem. When I ran my first Perl program I got an error saying " 'program.plx' is not recognized as an internal or external command, operable program or batch file." Upon seeing this I recognized what I thought the problem was and that being the same as one from back in my old DOS days. Since I was running the program from a different directory than where Perl was located it wouldn't run. So I went into the windows directory where the program was located and associated it with Perl. End of my problem. So when I ran each program from the command line they worked. That is until chapter 6. So when it came time to run "nl2.plx nlexample.txt", that is exactly what I typed.
The book read "> perl nl2.plx nlexample.txt", but my mind processed that as "perl>nl2.plx nlexample.txt". I reread the line countless times before I finally saw it. When I finally typed the all important command "perl" before program, they all started working. End of problem.
Thanks to all for your input and help even though it was a typo on my part. The reason that I explained my problem here is that if it happened to me, it just might happen to someone else and perhaps someone will remember this.
Frown

First page Previous page 1 2 Next page Last page  View All
 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives