chomp(my $blah = ); # This should be validated... my @input = split //, $blah; for my $index (0 .. $#input){ print "$index: $input[$index]\n"; }