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

Re: New feature proposal : <<>> to disable magic open of ARGV

Thread Previous | Thread Next
July 25, 2014 09:44
Re: New feature proposal : <<>> to disable magic open of ARGV
Message ID:
On Fri, Jul 25, 2014 at 07:22:22AM +0000, Ed Avis wrote:
> Just as -E supplements -e to avoid breaking backwards compatibility,
> new -N and -P flags could be introduced as safe alternatives to -n and -p.
> That said, I suggest the backwards compatibility standards applied to one-
> liners may be less strict than those for big programs, so perhaps -n and -p
> could just change.

I'd say that if there's one place where magic open is useful, it's
with -n and -p.

Considering that with one liners, you're typically in full control of
what you type, including the command line arguments, I'm not sure
whether just changing -n and -p, robbing the user of options, is the
right way.

When was the last time you couldn't write a -n/-p one liner, because
one of the arguments you wanted to give would trigger magic open, and
you didn't want that to happen?


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