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

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

Thread Previous | Thread Next
From:
Uri Guttman
Date:
July 27, 2014 23:00
Subject:
Re: New feature proposal : <<>> to disable magic open of ARGV
Message ID:
53D58487.20306@stemsystems.com
On 07/27/2014 06:44 PM, Aristotle Pagaltzis wrote:
> * Abigail <abigail@abigail.be> [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


-- 
Uri Guttman - The Perl Hunter
The Best Perl Jobs, The Best Perl Hackers
http://PerlHunter.com

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About