use strict; $SIG{__DIE__} = sub { print "something went wrong - $_[0]\n" }; eval { my $lexvar = *{"a string"}{IO}; }; # exceptions, shmexcetpions undef $@;