I can't get this regex right. I want to split a die statement into 2 components -- the user raised error ( die "MY ERROR" ) and the perl remark ( "at /path/to/file line 3.)
i've been staring at this too long. can someone point me in the right direction? This doesn't work at all, but it should illustrate what I mean better
sub die_clean
{
my ( $input ) = @_;
my ( $msg , $line ) = $input =~ /^([.]+)( at [\\\/\w\.\-\ ] line [
+\d]+\.)$/;
}