in reply to Input record separator

Your wish won't work, because the input record seperator cannot be treated as a regular expression.

You have a pretty common situation, where records are marked by a prefix instead of a postfix seperator. I think the easiest way to deal with that is to set local $/ to "\n>" and take the first record as a special case. Call chomp to remove the "\n>" from the end of the records.

After Compline,
Zaxo

Replies are listed 'Best First'.
Re^2: Input record separator
by travisbickle34 (Beadle) on Mar 18, 2005 at 10:31 UTC
    Thanks a lot guys - both very valid and helpful suggestions.
    Being a newbie, I was under the miconception that chomp ONLY removed newlines.
      No, chomp removes whatever currently is in $/, or what it matches (= multiple newlines) in the only case that actually acts like a regexp: paragraph mode.