in reply to Regex selection based upon position

Perhaps split?
while (<FILE>) { chomp; print join(";",split (/\s+/,$_)),"\n"; }

Replies are listed 'Best First'.
Re^2: Regex selection based upon position
by Perl Mouse (Chaplain) on Nov 15, 2005 at 12:42 UTC
    Using split to separate fix-width data sounds like a terrible idea to me. While short data will be padded with whitespace, there's no garantee all data is short - a 6 character entry in a 6 character wide field will not be padded. Furthermore, since the data is fixed-width, there's no need to escape whitespace - there might be whitespace as data. In fact, what you think is padding might actually be part of the data!
    Perl --((8:>*
Re^2: Regex selection based upon position
by BUU (Prior) on Nov 15, 2005 at 11:34 UTC
    "RESOURCE ORA"
      Sod. Didn't notice that. So this is no go.