In both the OPed code and in huck's reply:
This tries to build the anonymous hash { 1 } (update: a reference to which is assigned to $ComResult, which is never used) that Perl is, I think, warning about. (BTW: Kudos to PSP for using warnings — and I hope strict! OTOH, it would have been nice if PSP could have pointed out which line in the posted code was line 65.)my $ComResult={sidStatComp($prevsidstat,$cursidstat)}; ... sub sidStatComp { ... return 1; }
Update: Code examples:
c:\@Work\Perl\monks>perl -Mstrict -MData::Dump -e "my $x = { 1 }; dd $x; " { 1 => undef } c:\@Work\Perl\monks>perl -Mstrict -Mwarnings -MData::Dump -e "my $x = { 1 }; dd $x; " Odd number of elements in anonymous hash at -e line 1. { 1 => undef }
Give a man a fish: <%-{-{-{-<
In reply to Re^2: Passing hashes to sub
by AnomalousMonk
in thread Passing hashes to sub
by PSP
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |