Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Hello
I'm using 5.6.2 and got that same error. I fixed it by doing: @b=@_;@_=@b; # then preceed as usualI bet the problem is that you are calling the function as score(qw/X 6 5 7 9 ...../);instead of: @arr = qw/X 4 5 6 .../; score(@arr);Map is modifying the content of the list (using s#...#10#). Passing a list (constant) to the sub makes @_ elements aliases to the values passed. This is just like saying "helo" =~ s/l/ll/;which does not make sense. Did I make myself clear? Does it make sense? Aziz,,, In reply to Re: Re: Re: (Golf) Let's go bowling
by abstracts
|
|