spoke too soon. seems that under both linux and windows perl does read the shebang line. please ignore previous comment
On 7 March 2011 10:24, Erez Schatz <moonb...@gmail.com> wrote: > On 22 February 2011 17:19, Shawn H Corey <shawnhco...@gmail.com> wrote: >>> when I put this line in a script say a.pl: >>> #!/usr/bin/perl -wl >>> so, does this make perl ignore the "wl" switch in the script? >> >> No, perl reads the shebang line and sets the options. > > perl doesn't do any such thing. In a *nix shell environment, when the > file is being executed without calling the perl interpreter, the shell > interprets the line and execute it. If the script is run with "perl > foo.pl" then the shebang is ignored, as the perl interpreter ignores > it as a comment. I believe a Windows environment also ignores it. > > -- > Erez > > La perfection soit atteinte non quand il n'ya plus rien à ajouter, > mais quand il n'ya plus rien à retrancher. > -- Erez La perfection soit atteinte non quand il n'ya plus rien à ajouter, mais quand il n'ya plus rien à retrancher. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/