my %distAvail;
foreach (map(split(/\D+/,$_),<STDIN>)) { $distAvail{$_ }++; };
What does $distAvail{$_ }++; mean here?
The input is set of distances separated by whitespace (or any non-digit character). The book says %distAvail keys are distances and whose values give the number of copies of the key. But I don't understand how $distAvail{$_ }++;works.More over I have read that systax of map is
map EXPR, LIST;
but <STDIN> is not a list(i.e array) but a string of distances. Please correct me.