use strict; use warnings; my $foo = "just another string"; for my $bar ( $foo =~ /(.)/g ) { print $bar, "-"; } print "\n";