In Getopt I have "tlef:s@" => \$optsHash->{tlef}, which could be single or array. I moved to 5.20.2
if($self->{tlef}){ if(@{$self->{tlef}}) {
If tlef is defined once then I want to check if its an array. Previously if if(defined @{$self->{tlef}}) { was working. Now its deprecated, so if I remove define, I get the cant use string as ref issue. Is there an easy way to check if the command line option from GetOpt is array or single element?
Regards.In reply to Can't use string as an ARRAY ref by OldMonkRum
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |