in reply to Re: unexpected results using -s switch
in thread unexpected results using -s switch
and that's is expected.$ cat t.pl #!/usr/bin/perl print "foo=$foo\n"; $ perl t.pl -foo=bar foo=
and that's too, but:$ cat t.pl #!/usr/bin/perl -s print "foo=$foo\n"; $ perl -s t.pl -foo=bar foo=bar
if i call it without -s, but the shebang say -s, perl assign 1 which is neither bar or undef$ cat t.pl #!/usr/bin/perl -s print "foo=$foo\n"; $ perl t.pl -foo=bar foo=1
Oha
update: with the help of dada i think we have figured out it was a bug in perl.c function init_argv_symbols. checking on dev.perl.org on latest 5.x sources seems fixed btw. could anyone confirm? it's long since i read C code...
|
|---|