my $txt = '123'; local $"=','; my @array = glob( "{@{[ split(//,$txt)]}}" x length($txt) ); print Dumper \@array ;