my ($memAddr, $data, $ascii) = split /\s{2,}/, $line; # split line at 2+ spaces $data =~ s/ //g; # remove whitespace from $data chomp $ascii; # remove EOL from $ascii