Help for this page
# Define the format of the file my (@file_format) = ( 0, ... # etc. 241+169, # Last position, presumably );
my (@field_data); for (my $i = 0; $i < $#file_format; $i++) { ... $field_data[$i] =~ s/\s+$//; } print OUT_FILE join('|', @field_data);