| Код | #!/usr/bin/perl -s print "$xyz\n"; |
а -w заменить use warnings? В доке не нашел этого, но возможно это в новых версиях пошло, т.к. use warnings предпочтительнее стал, хотя не могу проверить. В доках промелькали баги опции -w + некоторые нюансы описываются http://perldoc.perl.org/perllexwarn.html + по опции -s добавлено | Цитата | | Also, when using this option on a script with warnings enabled you may get a lot of spurious "used only once" warnings. |
ginnie, amg, но у меня сработало иначе в *nix 
| Цитата | [nitr@SamsungQ210 work]$ cat test233851.pl #!/usr/bin/perl -ws print "$xyz\n"; [nitr@SamsungQ210 work]$ ./test233851.pl -xyz=abc abc [nitr@SamsungQ210 work]$ perl ./test233851.pl -xyz=abc abc [nitr@SamsungQ210 work]$ perl -s ./test233851.pl -xyz=abc abc [nitr@SamsungQ210 work]$ perl -v
This is perl, v5.10.0 built for i686-linux-thread-multi
Copyright 1987-2007, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page.
[nitr@SamsungQ210 work]$
|
Может это и был некий баг? Который исправлен, или баг от ActiveState (если винда)... |