my $i; for (0..10) { $i += $_; } #### my $sum = operate { $~ + $_ } (0..10); #### #Max: my $max = operate { $~ > $_ ? $~ : $_ } @list; #Straight Concat: my $string = operate { $~.$_ } @list; #Count occurences of words in a file: my $count = operate { $~ + /the/ } ;
## my $sum = operate { $~ + $_ } (0..10); ##
## #Max: my $max = operate { $~ > $_ ? $~ : $_ } @list; #Straight Concat: my $string = operate { $~.$_ } @list; #Count occurences of words in a file: my $count = operate { $~ + /the/ } ;