An error message you are not getting suggests you do not have strictures enabled; had they been, you might have been pointed down the Right Way sooner. IMO, always a good idea to enable strictures – and warnings! (Example code run under Strawberry 5.10.1, but should perform identically under any version.)
>perl -w -le "my @ra = (X => Y); print qq{@ra}; " X Y >perl -wMstrict -le "my @ra = (X => Y); print qq{@ra}; " Bareword "Y" not allowed while "strict subs" in use at ... Execution of -e aborted due to compilation errors.
In reply to Re: Error: Can't use string as a hash ref
by AnomalousMonk
in thread Error: Can't use string as a hash ref
by Nocturnus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |