my ($result) = map /(something)/, split /\n/, $content; #### my ($result) = $content =~ /(something)/;