foreach (@step) { $step = $step . $_; # or shorthand: $step .= $_ } #### Use of uninitialized value in concatenation (.) or string #### $_ =~ /($what){3}/ # match things in $what 3 times