[Chicago-talk] Perl script cannot find itself?

tiger peng tigerpeng2001 at yahoo.com
Fri Jun 17 05:58:01 PDT 2011


Yes. If it is not, it should get different error message.

I remember I did run into similar issue before. It was related to environment setting. 



________________________________
From: imran javaid <imranjj at gmail.com>
To: Chicago.pm chatter <chicago-talk at pm.org>
Sent: Thursday, June 16, 2011 3:54 PM
Subject: Re: [Chicago-talk] Perl script cannot find itself?


is test.pl executable?


-imran


On Thu, Jun 16, 2011 at 3:47 PM, tiger peng <tigerpeng2001 at yahoo.com> wrote:


>
>There are two Perl scripts only different by the first line. Why the one without -w in the #! line cannot find itself but the own with -w can?
>
>
>
>OS: Linux 2.4.5 #6 SMP
>Perl:  v5.8.0
>
>
>
>
>
>/tmp>$ sdiff test.pl test1.pl
>#!/usr/local/bin/perl                                         | #!/usr/local/bin/perl -w
>system ('which
 perl');                                          system ('which perl');
>print "hi\n";                                                   print "hi\n";
>
>
>
>/tmp>$ test.pl
>ksh: test.pl: No such file or directory
>:/tmp>$ ./test.pl
>ksh: ./test.pl: No such file or directory
>/tmp>$ /tmp/test.pl
>ksh: /tmp/test.pl: No such file or directory
>/tmp>$ perl test.pl
>/usr/local/bin/perl
>hi
>
>
>/tmp>$  test1.pl
>/usr/local/bin/perl
>hi
>
>
>
>
>
>
>_______________________________________________
>Chicago-talk mailing list
>Chicago-talk at pm.org
>http://mail.pm.org/mailman/listinfo/chicago-talk
>

_______________________________________________
Chicago-talk mailing list
Chicago-talk at pm.org
http://mail.pm.org/mailman/listinfo/chicago-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/chicago-talk/attachments/20110617/dd487e7a/attachment-0001.html>


More information about the Chicago-talk mailing list