in reply to substring too short and I don't care

if ( length($_) > 279 ) { substr($_,279) =~ s/$regex/$substitute{$1}/g; print OUT $_; }

Replies are listed 'Best First'.
Re^2: substring too short and I don't care
by Anonymous Monk on Aug 19, 2005 at 23:28 UTC
    That will silently discard any line with length < 279! I think you meant to print outside the if...
      Correct - I didn't read that the OP wanted to keep the line. The intent was to show how to get past the substr error, the skipping of the print statement was not intended to be of consequence.