hmerrill,
IMHO, it is much simpler to have $/ = ""; than it
is to have labels, redo statements, and variable flags.
Cheers - L~R | [reply] [d/l] |
If $/ = ""; works, great. But it won't for the problem as you stated.
What happens when someone needs to insert a 'Field 2b' in the format six months down the road? You would have to fully rewrite a grok-at-once gimmick, but you'd only have to add the support for a new field type if it were a sensible loop.
-- [ e d @ h a l l e y . c c ]
| [reply] [d/l] |
| [reply] [d/l] |
Debatable - I do conceed that the iterative approach means more code, keeping track of flags, etc. - it's not pretty. But I'd have to see a finished slurp example setting $/ = "" before judging that to be the better option. In all likelihood the slurp example may indeed come out on top, but its ease of understanding and maintainability would be greatly enhanced by a generous comment spelling out exactly what the thing does. Whatever you decide on as the final winner, post in this thread.
| [reply] |