However, the usefulness of '\local our' in this scenario eludes me. @::data does not get back its previous values.
In that case, as a feature, it still needs work, because it doesn't produce the same results as the existing syntax its intended to simplify:
our @data = 'fred'; sub x{ our @data; local *data = shift; print $data[ $_ ] for 0 .. $#data; };; my @junk = reverse 1 .. 10; x( \@junk ); print ">>@data<<<";; 10 9 8 7 6 5 4 3 2 1 >>fred<<<
In reply to Re^2: local our $var; What does it do?
by BrowserUk
in thread local our $var; What does it do?
by kcott
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |