sub cleaner { my ( $text ) = @_; $text =~ s/\n/
/gs; $text =~ s/\t/ /g; return $text; } my $details = cleaner( $clean_me );