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

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

Thread Previous | Thread Next
Uri Guttman
July 27, 2014 23:00
Re: New feature proposal : <<>> to disable magic open of ARGV
Message ID:
On 07/27/2014 06:44 PM, Aristotle Pagaltzis wrote:
> * Abigail <> [2014-07-27 20:00]:

> But with the diamond operator (and constructs which implicitly use it),
> you cannot. There is no switch you can pass or alternative you can use
> to say “I want all of these treated as filenames, regardless of what
> they look like”, like you can with filenames vs switches. You have no
> way to avoid the semi-predicate problem of the diamond operator other
> than avoiding its use entirely.

at oscon last week, damian showed a perl6 (and perl5 version) of a 
rename script. the example one liner he showed had * in it but he did 
globbing on that inside the script. afterwards both merlyn and myself 
asked the same question, why didn't the shell glob first? damian said he 
put a noglob command in an alias to call his script. not saying this is 
a solution to no magic but it doesn't force the arguments (after 
options) to be files and not globbed for you.


Uri Guttman - The Perl Hunter
The Best Perl Jobs, The Best Perl Hackers

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