![]() |
|
Do you know where your variables are? | |
PerlMonks |
Re: Basic question about Iterator codeby choroba (Cardinal) |
on May 12, 2025 at 14:18 UTC ( [id://11165017]=note: print w/replies, xml ) | Need Help?? |
You probably meant
instead of in the first sample. As for the error: in order to use the block syntax with a (&)-prototyped subroutine, you need to declare the subroutine before you use it. Move the last line to the top of the second sample and everything should work.
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
In Section
Seekers of Perl Wisdom
|
|