in reply to Can't open perl script: Permission denied
Hello all, Im new to perl and perl monks. Im reading perl in 24 hours by Clinton Pierce.
Most books who promise you to learn X in Y hours, days, weeks, any, generally lie and most often are just crap. Now, IIRC this particular one is a notable exception.
My question is: My first program, #!usr/bin/perl print "Hello, World!\n"; When I bring up my ms dos and type in "perl hello" I get this message, Can't open perl script "Hello": Permission denied. Can somone please tell how I get permission. thanks
(BTW: use <code> tags for writing code here, even if it's very short like in this case.)
That's strange, there should be no permission issues under Windows. Aren't you using cygwin by any chance? Whatever, if you have installed Activeperl, the installation program should have set the .pl association for you which means you can call your program hello.pl and run it like thus:
C:\temp>hello.pl Hello, World
Additionally, you can add .pl to the PATHEXT environment variable, which comes handy if you write some utility and put it somewhere in your PATH, so that you can call it utility.pl but you will run it without specifying the extension:
utility argument1 argument2...
Now, coming to your problem, how is you program actually called? Just hello? Isn't it by any chance hello.pl?
|
|---|