This is neat! Now, for a explanation of this code:
Remove all whitespace from the string $cow
$cow =~ s/\s//g;
Remove all characters in $cow which are not x or Y. Bind $cells to the number of removals performed (which turns out to be 100)
$cells = ($cow =~ s/[^xY]//g);
The next line has two maps.
- The first map operates on a list of 3 strings in which each string only contains a series of "x"s. Thus the tr command in the map is used to return the number of "x"s in each string it is fed. Ths resultant list is (9,11,11).
- The next map adds $cells (which is 100) to each of these numbers and prints the ascii value of these numbers, which prints out moo
PRINCE "too bad user settings doesnt let me preview this" PAWN