- or download this
sub resp { $a="abcdefg";\$a }
while (${&resp} =~ /(.)/g) {
print $1;
}
- or download this
sub resp { "abcdefg" }
while (&resp =~ /(.)/g) { # you forgot the &,didn't you?
print $1;
}
- or download this
while ("abcdefg" =~ /(.)/g) {
print $1;
}