Is there a way to do selection of both values in one line instead of adding up random_letter1, 2 and so on?my @arr = ('A'..'Z'); my $random_letter1 = $arr[int rand @arr]; my $random_letter2 = $arr[int rand @arr]; my $combo = $random_letter1 . $random_letter2; print $combo . "\n";
In reply to oneliner for selecting multiple values from array by ev00rg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |