It looks like @cleared is an AoA
The curly braces suggest to me that it might be an AoH instead.
johngg@shiraz:~/perl/Monks$ perl -Mstrict -Mwarnings -E ' my @AoH = ( { jobName => q{Director}, jobProfile => q{Three day week}, }, { jobName => q{Manager}, jobProfile => q{9to5}, }, ); foreach my $job ( @AoH ) { say $job; say $job->{ jobProfile }; }' HASH(0x562033e731e0) Three day week HASH(0x562033e92488) 9to5
I agree though that the unless ($x =~ m/^Something Else/){ does look weird as it would seem to be trying to match against a stringified reference. I suspect that we are not seeing the whole story.
Cheers,
JohnGG
In reply to Re^2: Loop Array - If $var is something write values until $var is something else
by johngg
in thread Loop Array - If $var is something write values until $var is something else
by maikelnight
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |