in reply to Re: Mixing tied variables with goto label
in thread Mixing tied variables with goto label
Yeah, but there is nothing special about that behavior. goto $var treats $var as the label as I showed in my first example. What I am trying to do is a little misdirection. Imagine that I could make you forget that I had a tied variable and that storing a value didn't appear to do anything abnormal:
my $label = 'START'; goto $label; START: print "Hello, world\n"; END: print "Goodbye, cruel world\n";
When you run the code, instead of going to START it actually goes to END. The trouble is that the label goes away inside the tied FETCH sub with no explanation I can find.
Cheers - L~R
|
|---|