A good way to format code is to start in the first column, and indent a fixed amount of spaces (for example 4) for each level of unclosed curly brace. See also: perlstyle. This is not just a question of aesthetics, it's a necessity for any nontrivial program.
I don't quite understand your code, and what you want to achieve; one comment says random columns for selection have been created, but I don't see any created columns; you just print some numbers to standard output, but never record them in a data structure, so they are essentially lost to the program.
##this bit of the script is not working ### # @uniform = $random_number; # my @temp = map { [ $_[1], $_[0], $_ ] } # step +1 # map { $_->[2] } # step 2 # @uniform;
It's not working because after the line @uniform = $random_number;, the array @uniform contains a single number. Whereas the map accesses the array elements as if there were array references stored in the array.
My general advise is to don't use map until you understand what your variables contain, and the basic control flow. Data::Dumper can help you with the former.
In reply to Re: Selecting, matching and counting column elements, using randomly generated numbers
by moritz
in thread Selecting, matching and counting column elements, using randomly generated numbers
by $new_guy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |