[lug] perl question
j davis
davis_compz at hotmail.com
Tue Jun 4 04:19:26 MDT 2002
hi,
this little piece of perl removes dups from a list..
so they tell me. does anyone here speak extreme laymen
and perl? Please explain how this works, i understand
arrays and hashes and i think i understand $_ just have never
used it. what i dont get is "++$temp{$_} < 2,"
(this assumes @list has list that needs cleaning)
%temp = ();
@list = grep ++$temp{$_} < 2, @list;
thanks, p.s. sorry about dup mail..
jd
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
More information about the LUG
mailing list