my $output = `echo $line`; $output =~ s/(\w+)$//; my $last_word = $1;