Jun 27, 2006 #1 sdslrn123 Technical User Jan 17, 2006 78 GB print FILE if ++$count{$_} < 2; Does anyone know what is being printed to the filehandle FILE?
Jun 27, 2006 #2 ishnid Programmer Aug 29, 2003 1,422 IE The contents of the special $_ variable. Upvote 0 Downvote
Jun 27, 2006 Thread starter #3 sdslrn123 Technical User Jan 17, 2006 78 GB Sorry, my fault, I am just trying to figure out what the whole line means? Upvote 0 Downvote
Jun 27, 2006 #4 Kirsle Programmer Jan 21, 2006 1,179 US It prints the value of $_ to FILE, if a hash with $_ as its key has a value that is greater than 2, after adding 1 to its current value. Upvote 0 Downvote
It prints the value of $_ to FILE, if a hash with $_ as its key has a value that is greater than 2, after adding 1 to its current value.
Jun 27, 2006 #5 Kirsle Programmer Jan 21, 2006 1,179 US er, less than 2 (was a bit dyslexic with the inequality sign there) Upvote 0 Downvote
Jun 27, 2006 #6 brigmar Programmer Mar 21, 2006 414 US In 'longhand' it would be: Code: $count{$_} = $count{$_} + 1; if ( $count{$_} < 2 ) { print FILE $_; } Upvote 0 Downvote
In 'longhand' it would be: Code: $count{$_} = $count{$_} + 1; if ( $count{$_} < 2 ) { print FILE $_; }