in reply to Re: Re: Re: Re: backreference question.
in thread backreference question.

did you mean like this when you say ref/deref :

sub resp { $a="abcdefg";\$a } while (${&resp} =~ /(.)/g) { print $1; }
however that goes to an infinitely loop too and for the first time on windows I crash perl interpreter so fast (when i hit Ctrl^C).
sub resp { "abcdefg" } while (&resp =~ /(.)/g) { # you forgot the &,didn't you? print $1; }
in the above code, I expect that &resp returns the 'value' of the subroutine and becomes
while ("abcdefg" =~ /(.)/g) { print $1; }
it would work if it were the case.

so return by ref doesn't work either. what happens in while( &resp =~ /(.)/g ) ??