Fred K Ollinger on Wed, 8 May 2002 20:02:29 -0400


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] OT: learn perl


> Any way you know of getting it to run without the ./
> in front?

Edit your path, you can do this in .bash_profile:

PATH=$PATH:.
export PATH

I usually do this, though:

PATH=$PATH:~/bin
export PATH

then I drop perl progs in ~/bin

Fred

>
> Adam
>
>
> --- "Kyle R . Burton" <mortis@voicenet.com> wrote:
> > > 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
> >
> >
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Shopping - Mother's Day is May 12th!
> http://shopping.yahoo.com
>
> ______________________________________________________________________
> 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
>


______________________________________________________________________
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