use strict; my @arr = qw(a b c d e f g h); my $str; $str .= shift(@arr) until (!(@arr)); print $str; #### $str = join '', @arr;