I'm maintaining code that was handling only numerical inputs. Now the input may be a hash reference or a number. How can I filter out the hash reference inputs? My code is sort of like this now:
if ($val =~ /^([\d]+)\'[b]([01]+)$/) { $strlen = $1; my $binstr = $2; #do things ... } else { print "Wrong kind of input"; }
In reply to function input may be hash ref by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |