podian has asked for the wisdom of the Perl Monks concerning the following question:
The above code prints this#!/usr/local/bin/perl use strict; my @ar; sub test_args{ my (@ar,$t) = @_; print "t = $t\n"; print "ar = @ar\n"; } push (@ar,"one"); push (@ar,"two"); test_args(@ar,"three");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: passing array as an argument
by davido (Cardinal) on Oct 30, 2003 at 21:59 UTC | |
by pg (Canon) on Oct 30, 2003 at 22:06 UTC | |
by sauoq (Abbot) on Oct 31, 2003 at 00:48 UTC | |
|
Re: passing array as an argument
by hardburn (Abbot) on Oct 30, 2003 at 22:01 UTC | |
|
Re: passing array as an argument
by hmerrill (Friar) on Oct 30, 2003 at 22:17 UTC | |
|
Re: passing array as an argument
by Roy Johnson (Monsignor) on Oct 30, 2003 at 22:37 UTC |