$my_data_line =~ s/^\s+|\s+$//g; [download]
In reply to Re^2: Pulling white space off before/after string? by romskie in thread Pulling white space off before/after string? by ecuguru