in reply to Re: Getting data out of __DATA__ and __END__
in thread Getting data out of __DATA__ and __END__
Sorry but as you said earlier I beg to differ. :-)
There is something deeper and funkier happening than what you have stated is going on. I dont claim to know what it is but its definately not the 'if the last line is blank' problem. You might want to take a look at my other reply in this thread for a couple of examples, but try this on for size:
my @ary=split(" ",$_) while (<DATA>); print "@ary"; __DATA__ These are words
Now this DOESNT work. Even though there is no blank line. (use an editor that can show you newlines to make sure.) Now make one tiny change and what happens
Voila it works! So now we KNOW that it isnt anything to do with those darn sneaky hidden blank lines.my @ary; @ary=split(" ",$_) while (<DATA>); print "@ary"; __DATA__ These are words
Quite frankly until somebody at the wizard/god level tells me this isnt a bug and explains exactly what is going on my money is on the cockroaches...
Yves
--
You are not ready to use symrefs unless you already know why they are bad. -- tadmc (CLPM)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Sorry but 'last line is blank' doesnt wash..
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 |