in reply to When warnings get in the way
However, when checking data passed to a method or subroutine, I prefer to use the ||= (aka "default") method:if ($form{$key} && $form{$key} =~ /\w+/) { # ...
Finally, in general, I try to scope, declare, and initialize my variables at the start of the program whenever possible.my ($self,$asdf) = @_; $asdf ||= '';
|
---|