http://www.perlmonks.org?node_id=537813


in reply to regex die?

my ($msg, $line) = (split /\s*at|line\s*|\.$/, $input)[0,2];

With GrandFather's caveat.