$string = "this is a test"; foreach $char (split //, $string) { print "$char\n"; }