The stupid question is the question not asked | |
PerlMonks |
Re: print failing to output anythingby Roy Johnson (Monsignor) |
on Nov 12, 2003 at 20:57 UTC ( [id://306632]=note: print w/replies, xml ) | Need Help?? |
Some comments:
No real need to declare and initialize these here. You can do it when you get the input: Should use chomp, instead. Then you make the computer read the whole file and do a bunch of matches that you completely ignore:
Then a whole bunch of (re-)declarations and initializations, several of which were pointless, then some attempts to match on $_, but none of them happen because it's empty now. The main problem is that you haven't wrapped your file-reading loop around the code that's supposed to be doing the work. Apart from that, you've made some sub-optimal decisions about what to use: the foreach's should probably be whiles, and the patterns should be qr//'d instead of double-quoted.
In Section
Seekers of Perl Wisdom
|
|