In more general terms, I typically use something like this to silence those warnings (assuming a value of undef is not an error):
If in fact undef is an error I would generally use something along this line:my $string_var = defined( $input_field ) || ''; # or if ( ($string_var || '') !~ /some_pattern/ ) { ... }
croak "HEY! Why am I not defined?" if !defined( $input_field );
In reply to Re: Undef and Unitialized Issue
by boftx
in thread Undef and Unitialized Issue
by Pharazon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |