- or download this
%{ $href } # better than %$href
@{ $aref } # better than @$aref
- or download this
if ( scalar @{ $lib || [] } ) {
...
}
- or download this
$ perl -Mstrict -E 'my $aref = [ "", undef ]; say scalar @{ $aref || [
+] } ? "True" : "False";'
True
- or download this
$ perl -Mstrict -E 'my $aref = [ "", undef ]; say scalar ( grep { leng
+th $_ } @{ $aref || [] } ) ? "True" : "False";'
False