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

Re: Alarums and Excursions (was [perl #2783] Security of ARGV using2-argument open)

Thread Previous | Thread Next
Mark Mielke
July 28, 2008 00:31
Re: Alarums and Excursions (was [perl #2783] Security of ARGV using2-argument open)
Message ID:
Ed Avis wrote:
> Indeed.  I would much rather write while (<>).  At the moment I can't, at least
> not unless I add a 'notes and gotchas' section to my program's manual page
> noting that it will open the wrong file if a filename has trailing spaces,
> overwrite some random other file if a filename begins with >, and start running
> arbitrary external commands if a filename begins or ends |.

You and Aristotle have almost bought me over. I think the only part I'm 
missing to be 50% + 1 convinced personally is a survey or some other 
measure on how widely used these features are. I've already said I don't 
use them - but I'm not the type of person to see something cute and use 
it wherever I can just to say that I did. It is correct that modern 
shells provide all of the necessary functions, and these are usually 
easier to understand, therefore I expect the people who use it, to be 
the people who like to be overly clever and cute, and chose to use it, 
rather than found themselves forced to use it. :-)

I'm still scared that Perl 5.10 will break my existing programs, and 
5.12 more so, especially with many of the recent threads in this mailing 
list that seem to place less value that I prefer on backwards 
compatibility. *sigh*


Mark Mielke <>

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