in reply to Getting data out of __DATA__ and __END__
This will work as expected.while (<DATA>) { push @ary,split; } print join " / ",@ary; __DATA__ one two three four boop noop boop crep
Update: You could also write it as:
but personally I think the first version is more readable.push @ary,split while (<DATA>); print joint " / ",@ary;
JJ
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Sorry but 'last line is blank' doesnt wash..
by demerphq (Chancellor) on Sep 10, 2001 at 20:39 UTC | |
by rchiav (Deacon) on Sep 10, 2001 at 21:53 UTC | |
by demerphq (Chancellor) on Sep 10, 2001 at 22:17 UTC | |
by George_Sherston (Vicar) on Sep 10, 2001 at 23:19 UTC |