in reply to Re: simple symbolic reference Q
in thread simple symbolic reference Q
#!/usr/bin/perl -w use strict; my ($Devel, $Debuff_Output) = (1,1); if ($Debuff_Output) { select STDERR; $| = 1; select STDOUT; $| = 1; } if ($Devel) { use Carp qw(cluck confess); $SIG{__WARN__} = $SIG{__DIE__} = sub {confess @_} } our @array = (1, 2, 3, 4); our @array2 = (3, 5, 7); sub arlen ($) { my $ar_nam=$_[0]; no strict 'refs'; my $ar_len = @$ar_nam; sprintf "name=%s, length=%d", $ar_nam, $ar_len; } foreach ('array', 'array2') { no strict 'refs'; printf "Array %s\n", arlen $_; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: simple symbolic reference Q
by chromatic (Archbishop) on Oct 04, 2010 at 23:17 UTC | |
by perl-diddler (Chaplain) on Oct 05, 2010 at 01:21 UTC | |
by AnomalousMonk (Archbishop) on Oct 05, 2010 at 02:14 UTC | |
|
Re^3: simple symbolic reference Q
by AnomalousMonk (Archbishop) on Oct 05, 2010 at 02:27 UTC |