Try this.
Result: Efficient pass-by-reference without the pain of dereferencing.
#! perl -slw use strict; sub modify (\$) { our $data; local *data = $_[ 0 ]; $data =~ s[this][that]g; return; } my $string = 'this & that;' x 10000; modify $string; print substr $string, 0, 24;
In reply to Re: Simple Pass By Reference
by BrowserUk
in thread Simple Pass By Reference
by tomazos
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |