in reply to use of typeglob aliases
Not quite like that, and not for such simple uses as these, but but I often use typeglob aliasing to avoid complex dereferencing within subroutines:
#! perl -slw use strict; sub processBigArray { our @alias; local *alias = shift; $_ += 1 for @alias; return; } my @a = 1 .. 1e6; processBigArray( \@a ); print for @a[ 0 .. 9 ]; __END__ C:\test>junk38 2 3 4 5 6 7 8 9 10 11
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: use of typeglob aliases
by Anonymous Monk on Sep 05, 2013 at 16:25 UTC |