in reply to Re: uninitialized value in concatenation
in thread uninitialized value in concatenation
A here document start marker needs a semicolon directly after the here document name (EOF in this case) afaik.
No, other stuff can follow the marker if required. I often use this to inline data in a HEREDOC and open it as if it was a file.
knoppix@Microknoppix:~$ perl -Mstrict -we ' > open my $fh, q{<}, \ <<EOD or die qq{open: < HEREDOC: $!\n}; > line 1 > line 2 > line 3 > EOD > > while ( <$fh> ) > { > $_ = ucfirst; > print; > } > > close $fh or die $!;' Line 1 Line 2 Line 3 knoppix@Microknoppix:~$
I hope this is of interest.
Cheers,
JohnGG
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: uninitialized value in concatenation
by aquarium (Curate) on Nov 17, 2010 at 00:42 UTC | |
by Anonymous Monk on Nov 17, 2010 at 02:02 UTC |