develooper Front page | perl.perl5.porters | Postings from October 2003

Re: new slurp module

Thread Previous | Thread Next
From:
david nicol
Date:
October 26, 2003 18:25
Subject:
Re: new slurp module
Message ID:
1067221452.1070.36.camel@plaza.davidnicol.com
On Sun, 2003-10-26 at 15:49, Yitzchak Scott-Thoennes wrote:
> On Fri, Oct 24, 2003 at 05:51:30PM +0200, Abigail <abigail@abigail.nl> wrote:
> >   my @stuff = map {something ()} do {local @ARGV = "filename"; <>};
> 
> local @ARGV followed by <> isn't a safe thing to do unless you know
> you aren't running under -i, which rules it out for reusable code.


i find it hard to imagine that a long-lived server that slurps
its data files might get invoked under -i, which is primarily
for one-liners.


-- 
david nicol / A thousand towers rise before me and I cannot climb them all.


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