in reply to Re^3: Splitting file into separate files based on record lengths and identifiersin thread Splitting file into separate files based on record lengths and identifiers
if( s{ (\d+) \% }{}msx ){
to
if( s{ ^ (\d+) \% }{}msx ){