It removes dups just fine but I can't figure out what the "++" is doing. Can you explain what's going on in a step-by-step fashion?@list = qw/paul jane paul betty paul jane/; %temp = (); @list = grep ++$temp{$_} < 2, @list;
2006-03-31 Retitled by planetscape, as per Monastery guidelines
Original title: 'grep'
In reply to explain use of increment operator in grep by pglenski
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |