X
xhoster
I'm sure something in perldoc perlrun is relevant to my question, but
I can't figure out what. Please give me a kick in the pants.
$ cat foo.pl
#!/home/xho/perl_10/bin/perl -Ifoo -Ibar -l
print foreach @INC;
__END__
$ ./foo.pl
foo -Ibar -l
/home/xho/perl_10/lib/5.10.0/x86_64-linux-thread-multi
/home/xho/perl_10/lib/5.10.0
/home/xho/perl_10/lib/site_perl/5.10.0/x86_64-linux-thread-multi
/home/xho/perl_10/lib/site_perl/5.10.0
..
foo
bar
So, why are foo and bar put at the end of @INC, instead of at the beginning
where perlrun says they should?
And why is "foo -Ibar -l" put at the front of @INC, as if all of the
shebang line after the first word were put in quotes?
This behavior doesn't seem specific to 5.10.0, it is seen in various 5.8
as well. If invoked like "perl foo.pl" then the foo and bar still
go at the end, rather than beginning, but the weird first entry is omitted.
Xho
--
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.
I can't figure out what. Please give me a kick in the pants.
$ cat foo.pl
#!/home/xho/perl_10/bin/perl -Ifoo -Ibar -l
print foreach @INC;
__END__
$ ./foo.pl
foo -Ibar -l
/home/xho/perl_10/lib/5.10.0/x86_64-linux-thread-multi
/home/xho/perl_10/lib/5.10.0
/home/xho/perl_10/lib/site_perl/5.10.0/x86_64-linux-thread-multi
/home/xho/perl_10/lib/site_perl/5.10.0
..
foo
bar
So, why are foo and bar put at the end of @INC, instead of at the beginning
where perlrun says they should?
And why is "foo -Ibar -l" put at the front of @INC, as if all of the
shebang line after the first word were put in quotes?
This behavior doesn't seem specific to 5.10.0, it is seen in various 5.8
as well. If invoked like "perl foo.pl" then the foo and bar still
go at the end, rather than beginning, but the weird first entry is omitted.
Xho
--
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.