use strict; use warnings; my $string = "Hello World"; while($string =~/./g){ print "$&\n"; }