in reply to Opinion: where Perl5 wasn't attractive for me
Some options always present themselves.
Count the sigils. Yay!package lvals { sub import { shift; no strict 'refs'; *{caller.q(::).$_} = do{ my $x; sub () :lvalue {$x} } for @_; } } 1;use lvals qw(i j matrix sum); matrix = [([1..10]) x 10]; for(i = 0; i < 10; i++) { for(j = 0; j < 10; j++) { sum += matrix->[i][j]; } } print "Matrix sum is ", sum;
/me quickly hides under the rock.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Opinion: where Perl5 wasn't attractive for me
by BrowserUk (Patriarch) on Dec 12, 2014 at 04:18 UTC | |
|
Re^2: Opinion: where Perl5 wasn't attractive for me
by LanX (Saint) on Nov 24, 2014 at 10:24 UTC | |
by McA (Priest) on Nov 24, 2014 at 12:00 UTC | |
by LanX (Saint) on Nov 24, 2014 at 12:11 UTC | |
|
Re^2: Opinion: where Perl5 wasn't attractive for me
by astroboy (Chaplain) on Dec 12, 2014 at 03:49 UTC |