in reply to Any downsides to this slurp idiom?
If the file you're slurping has any size, you're better to do:
thanmy $s; do{ local( @ARGV, $/)='big.file'; $s = <> };
my $s = do{ local( @ARGV, $/)='big.file'; <> };
As the latter makes two copies of the file. One in a temporary, and then a copy in $s.
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". The enemy of (IT) success is complexity.
In the absence of evidence, opinion is indistinguishable from prejudice.
Suck that fhit
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Any downsides to this slurp idiom?
by vr (Curate) on Jun 22, 2018 at 17:55 UTC | |
by Your Mother (Archbishop) on Jun 22, 2018 at 18:22 UTC | |
by vr (Curate) on Jun 22, 2018 at 18:40 UTC | |
by BrowserUk (Patriarch) on Jun 22, 2018 at 20:46 UTC | |
by vr (Curate) on Jun 22, 2018 at 23:03 UTC | |
by BrowserUk (Patriarch) on Jun 23, 2018 at 01:09 UTC |
In Section
Seekers of Perl Wisdom