Keep It Simple, Stupid | |
PerlMonks |
Re^2: Slice misuse ?by blogical (Pilgrim) |
on Aug 07, 2006 at 22:06 UTC ( [id://566023]=note: print w/replies, xml ) | Need Help?? |
I had yet to run it in context, where I DO have warnings and strict on. I encountered the error while running perl -c on a mason component I wrote. my $id = $ARGS{to} || ( $m->dhandler_arg =~ /^(\w+)\/pledge/ )[0]; is the offending line. ( $m->dhandler_arg =~ /^(\w+)\/pledge/ )[0] seemed to be the offending part, so I pulled it out for examination. I used a print statement for testing. I should have run perl -We instead of -e on my test case. Also, I should have used a more accurate test case, as I seem to have gone hunting for the a problem I didn't originally have (and found it!) "One is enough. If you are acquainted with the principle, what do you care for the myriad instances and applications?"
In Section
Seekers of Perl Wisdom
|
|