Can Python learn from Perl? Perl 5 can now run Perl 6 code

Chris Angelico rosuav at gmail.com
Thu Jul 28 10:40:47 EDT 2016


On Thu, Jul 28, 2016 at 11:53 PM, Random832 <random832 at fastmail.com> wrote:
> On Thu, Jul 28, 2016, at 03:21, Steven D'Aprano wrote:
>> Well, kinda sorta. I'm not really pulling your leg. But Perl has a
>> feature that if you tell it to run a file with a hashbang line, it
>> will call the given executable to run that file. That's now been
>> improved to recognise Perl6 as an external executable, instead of
>> trying to run it as Perl 5 code.
>
> Okay... think about that for a minute. Under what circumstances are you
> likely to start a file with a hashbang line with a program other than
> the one named in the hashbang line?
>

I dunno... someone types "python scriptname.py" maybe? Doesn't ever
happen, which is why it totally isn't in my FAQ for my students.

ChrisA



More information about the Python-list mailing list