LanceDeeply has asked for the wisdom of the Perl Monks concerning the following question:
slurps the __DATA__ section into my scalar $data, but what is perl doing in that do loop?my $data = do { local $/; <DATA> };
what's happenning in there?my $data = do { local $/; # localize RS? <DATA> # evaluate <DATA> in scalar context ? }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: slurping __DATA__
by jeffa (Bishop) on Aug 08, 2003 at 14:17 UTC | |
by LanceDeeply (Chaplain) on Aug 08, 2003 at 14:44 UTC | |
by jeffa (Bishop) on Aug 08, 2003 at 14:49 UTC | |
|
Re: slurping __DATA__
by Zeroth (Beadle) on Aug 08, 2003 at 14:17 UTC |