Re: [SPOILER] Perl 'Easy' Quiz of the Week #2005-1
Roger Burton West <roger-UvLOT2mcgw/[email protected]> Mon, 24 Jan 2005 15:59:06 +0000
| Newsgroups | gmane.comp.lang.perl.qotw.discuss |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Jan 24, 2005 at 10:46:25AM -0500, Bill Smith wrote: >The actual processing is straightforward, but probably reflects my >FORTRAN background. The problem of dividing a file into groups of >similar records is very common. I look forward to learning a more perl >oriented approach to the more general problem. Oh dear. I don't have a FORTRAN background, but our programs are essentially identical in the core... ># .M record for end of last group (if needed) >print OUTFILE "$prefix.M\n" unless $mflag or !defined $prefix; By initialising my equivalent of $mflag to 1, I avoided the last part of that test. R