use strict; $SIG{'__DIE__'} = sub { local $" = ', '; # this will have no effect on @errs my @errs = @_; print "$0: @errs"; exit(1); }; die('foo', {'bar' => 'xxx'}, ['baz','quux']); __END__ output - die.pl: fooHASH(0x80f9964)ARRAY(0x810a014) at die.pl line 9.