develooper Front page | perl.perl5.porters | Postings from July 2020

Re: Perl 7 - updates

Thread Previous | Thread Next
Todd Rinaldo
July 4, 2020 06:26
Re: Perl 7 - updates
Message ID:

> On Jul 3, 2020, at 8:36 PM, Darren Duncan <> wrote:
> On 2020-07-03 5:35 p.m., Todd Rinaldo wrote:
>> As far as I understand, the Perl parser doesn't start parsing the code until it sees #!/usr/bin/perl in which case you just put use v7 after that line.
> I'm quite sure that is wrong.

I assume you saw Tomasz's email about perl -x? I would have stated as much except I wrote that code 9 years ago and forgot what it did in the time inbetween :D 

> In fact I've heard it often argued that having a shebang line for the most part is an obsolete notion and it is best to NOT have it, especially as in the general case what it says is completely wrong.  What if your Perl lives somewhere else?  Or what if you're running Windows?
> Although a lot of that is addressed by using a different more adaptable shebang line like either of these:
>  #!perl
>  #!which perl
>  #!/usr/bin/which perl

IMO this just leads to a script which runs a potentially unexpected perl based on your environment. That perl may or may not have the modules you need to run your script. Even EU::MM recognizes this and updates the #!  in scripts to match the perl that executed Makefile.PL


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About