Perl_把字符串分开成单独的字母_split(//,$var)
my $var="ABCDEFG";
my @array=split(//,$var);
foreach my $num (0..$#array)
{
print $array[$num]."\n";
}
output: A B C D E F G
Perl_把字符串分开成单独的字母_split(//,$var)
my $var="ABCDEFG";
my @array=split(//,$var);
foreach my $num (0..$#array)
{
print $array[$num]."\n";
}
output: A B C D E F G