John SJ Anderson <geneh...@genehack.org> writes: > In general, anywhere you're doing '@{[shift]}', unless you REALLY know > what's going on and why you'd want to do that ... instead just do > 'shift'.
Thanks for the in depth answer. Very helpful. You've helped fill some tragic holes in my basic knowledge of perl. I've learned the little I know... by hook or by crook, not a systematic progress from basic to higher skills. About just using 'shift': How I happened to be using that weird looking notation at all was because I thought it was a way to avoid the extra step of compiling the rgx in qr// after shifting. I did try that long ago but found that 'shift' is not interpreted properly inside qr/shift/. I guess that may be a pretty lame reason, and better to just include the extra couple lines. Or do you mean there is a way to use just 'shift' inside qr//. Maybe with some tricky quoting? If used in the current example, the notation above just skips shifting at all and passes the rgx to -d -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/