This is true in the general case, but I think it's completely the wrong advice in the present case. Why name something you don't care about? Specifically, $first and $ignore? Notwithstanding the fact that ignore is a really bad name. So is first, second and third but I assume you just named them that way for this example.
The slice syntax is much clearer: it indicates that whatever is in offsets 0 and beyond 2 are of no importance. And if the elements are not heterogeneous, there's no point in naming them separately as they are members of a group rather than individual elements in their own right. Thus, they have no need for names.
I find the code you posted less readable, as I have to spend time wondering what $first and $ignore are doing, and whether some code has been left off or accidentally removed that might have done something with them. And so I have to concentrate for a second and ask myself "what exactly is meant here...?!"
• another intruder with the mooring in the heart of the Perl
In reply to Re^2: split slice?
by grinder
in thread split slice?
by convenientstore
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |