in reply to Error: Can't use string as a hash ref
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Error: Can't use string as a hash ref
by Nocturnus (Scribe) on Apr 22, 2012 at 06:55 UTC | |
by aaron_baugher (Curate) on Apr 23, 2012 at 02:05 UTC | |
by Nocturnus (Scribe) on Apr 28, 2012 at 17:12 UTC |