Perl Monk, Perl Meditation | |
PerlMonks |
comment on |
( [id://3333]=superdoc: 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 reply to Re: print failing to output anything
by Roy Johnson
|
|