* B McKee <[EMAIL PROTECTED]> [2004-03-18T13:48:55] > >here is what I am typing: > >>perl -e test.pl > > Change to the directory you saved the script, > make sure it's executable with > chmod +x test.pl > then run it directly > ./test.pl
...or if you don't want to make the file +x, you can just run it like this: [EMAIL PROTECTED] perl test.pl The -e switch tells perl to evaluate the text given to it as the script, so it doesn't open the file and run that. So you could do this: [EMAIL PROTECTED] perl -e 'print "Hello, sailor!\n"' Also, there's some hard feelings about file names. *.pl was the old school Perl extension for libraries of code, which served roughly the same purpose as *.pm files serve now. Kinda. It stands for Perl Library. If you aren't writing a library, some people (including me) would suggest that the extension is incorrect. On a unixy system, you indicate that its a program with the +x bit and you indicate that it's Perl with the shebang (#!/...) line. Of course, on Win32, you need an extension. Some people have suggested .plx, but ActiveState has used .pl, which has made it become fairly standard. Ok, that's all. -- rjbs
pgp00000.pgp
Description: PGP signature