about perl -wl
Hi,
when I put this line in a script say a.pl:
#!/usr/bin/perl -wl
....
And later I run it from the command line:
perl a.pl
so, does this make perl ignore the "wl" switch in the script?
Thanks.
--
Free SmartDNS Hosting:
http://DNSbed.com/
--
To unsubscribe, e-mail: beginners-unsubscribe [at] perl.org
For additional commands, e-mail: beginners-help [at] perl.org
http://learn.perl.org/
Re: about perl -wl
On 11-02-22 09:57 AM, terry peng wrote:
> Hi,
>
> when I put this line in a script say a.pl:
>
> #!/usr/bin/perl -wl
> ...
>
> And later I run it from the command line:
> perl a.pl
>
> so, does this make perl ignore the "wl" switch in the script?
>
> Thanks.
>
No, perl reads the shebang line and sets the options.
--
Just my 0.00000002 million dollars worth,
Shawn
Confusion is the first step of understanding.
Programming is as much about organization and communication
as it is about coding.
The secret to great software: Fail early & often.
Eliminate software piracy: use only FLOSS.
--
To unsubscribe, e-mail: beginners-unsubscribe [at] perl.org
For additional commands, e-mail: beginners-help [at] perl.org
http://learn.perl.org/
Re: about perl -wl
On 22 February 2011 17:19, Shawn H Corey <shawnhcorey [at] 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 =E0 ajouter,
mais quand il n'ya plus rien =E0 retrancher.
--
To unsubscribe, e-mail: beginners-unsubscribe [at] perl.org
For additional commands, e-mail: beginners-help [at] perl.org
http://learn.perl.org/
Re: about perl -wl
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 <moonbuzz [at] gmail.com> wrote:
> On 22 February 2011 17:19, Shawn H Corey <shawnhcorey [at] 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 =E0 ajouter,
> mais quand il n'ya plus rien =E0 retrancher.
>
--
Erez
La perfection soit atteinte non quand il n'ya plus rien =E0 ajouter,
mais quand il n'ya plus rien =E0 retrancher.
--
To unsubscribe, e-mail: beginners-unsubscribe [at] perl.org
For additional commands, e-mail: beginners-help [at] perl.org
http://learn.perl.org/