http://qs321.pair.com?node_id=1211010


in reply to Simple Q. for You

And if you do (and you really should) play around with it, see how concise and idiomatic Perl can be. This does the same (provided it's the final statement in the sub and you might need to turn off uninitialized warnings depending on how it's called). Using syphilis's example as a base–

sub test_it { $d->{foo} =~ /X/i; }