in reply to Wrong idioms
If this code should only check that filename is defined (i.e. allow empty string), you can write (even for perl <5.10) it like this:sub readfile { my $filename = shift or return; ... }
defined(my $filename = shift) or return;
In Section
Seekers of Perl Wisdom