- or download this
use Data::Dumper;
use List::Util qw(first);
...
say Dumper([grep { $_->{"aaa"} < 4 } @x]->[0]);
say Dumper((first { $_->{"aaa"} < 4 } @x));
- or download this
$VAR1 = undef;
$VAR1 = undef;
- or download this
say Dumper([grep { $_->{"aaa"} < 4 } @x]->[0]->{"aaa"});
say Dumper((first { $_->{"aaa"} < 4 } @x)->{"aaa"});
- or download this
$VAR1 = undef;
Can't use an undefined value as a HASH reference at test.pl line 7.