|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|
Re: [PLUG] OT: learn perl
|
> Speaking of learning Perl, I've started along that
> path myself. Here's a real "newbie" question that my
> Perl book does not address: When I test my script
> (test.pl), normally I have to type
>
> perl test.pl
>
> to run the script even if its first line is
> #! usr/bin/perl
>
> If I just type "test.pl" or "./test.pl" at the bash
> prompt I get a "bad interpreter" message. Is there
> something I can do to get my machine to recognize the
> script?
For the shbang [#!] to work, it has to be immediatly followed by a
valid path to an executable, andd your script has to be executable.
#!/usr/bin/perl
Should work if perl is located in /usr/bin
k
--
------------------------------------------------------------------------------
Wisdom and Compassion are inseparable.
-- Christmas Humphreys
mortis@voicenet.com http://www.voicenet.com/~mortis
------------------------------------------------------------------------------
______________________________________________________________________
Philadelphia Linux Users Group - http://www.phillylinux.org
Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce
General Discussion - http://lists.phillylinux.org/mail/listinfo/plug
|
|