$count{$_}++ for @Clec_id; print "$_ => $count{$_}\n" for keys %count;can someone please explain
Well, I got here too late and other people had already explained. So instead, I decided to play games with it, like getting it onto one line and getting rid of the well-named variables. (Honestly, naming a variable "count" when it's perfectly obvious that it's a counting variable... if you're not careful, people will be able to read your code...) So, um, this may not be helpful or answer your question, but it was fun:
print"$_ => $}{$_}\n"for grep{!$!{$_}++}map{$}{$_}++;$_}@Clec_id;$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/
In reply to Re: Can someone Explain 2 lines of code
by jonadab
in thread Can someone Explain 2 lines of code
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |