I wrote: > package T { sub TIESCALAR{bless[]} sub STORE { warn "Storing $_[1]" } } > foo(); > use experimental "signatures"; > sub bar ($x=3) { > sub foo { tie $x, "T" } > } > bar(); Here is the goto version: package T { sub TIESCALAR{bless[]} sub STORE { warn "Storing $_[1]" } } use experimental "signatures"; sub bar ($=$_ == 1 && goto foo, $y=3) { foo: tie $y, "T" if $_ == 1 } $_ = 1; bar(); $_ = 0; bar();Thread Previous | Thread Next