Please enlighten.
What am I doing wrong here? I'm trying to decompose a string but for some reason I get uninitialized values.
Thanks!
sub test { my $a = shift; $a =~ /(.)(.)(.)(..)(.+)/; return 0 if ($1 !~ /(a)/); return 0 if ($2 !~ /(d|p|t)/); return 0 if ($3 !~ /(a|h|r|s|t)/); return 0 if ($4 !~ /(aw|er|dd|cb|aa)/); }
Use of uninitialized value $2 in pattern match (m//) at
In reply to What is this erroring out? by yoda54
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |