Newsgroups: fj.lang.perl
Path: galaxy.trc.rwcp.or.jp!coconuts.jaist!wnoc-tyo-news!wnoc-sfc-news!wnoc-kyo-news!kuis-news!kuee-news!odins-suita!chiba-ns!news.chiba-u.ac.jp!eclnews!nttarm!news
From: "K.Hiraga" <box@mxa.meshnet.or.jp>
Subject: Re: [Q] How to use array as an argument for a subroutine
Content-Type: text/plain; charset=iso-2022-jp
Message-ID: <32ACD31A.45BA@mxa.meshnet.or.jp>
Sender: news@nttarm.ntt.jp (News Administrator)
Content-Transfer-Encoding: 7bit
Organization: K.Hiraga
References: <32A7D080.5506@mxa.meshnet.or.jp>
Mime-Version: 1.0
Date: Tue, 10 Dec 1996 03:03:54 GMT
X-Mailer: Mozilla 2.02 [ja] (Win95; I)
Lines: 30
Xref: galaxy.trc.rwcp.or.jp fj.lang.perl:1524
X-originally-archived-at: http://galaxy.rwcp.or.jp/text/cgi-bin/newsarticle2?ng=fj.lang.perl&nb=1524&hd=a
X-reformat-date: Mon, 18 Oct 2004 15:18:22 +0900
X-reformat-comment: Tabs were expanded into 4 column tabstops by the Galaxy's archiver. See http://katsu.watanabe.name/ancientfj/galaxy-format.html for more info.

$BJ?2l$H$b$&$7$^$9!#(B

$B$_$J$5$^!"%U%)%m!<$*$h$S%a!<%k$G$N%"%I%P%$%9(B
$B$"$j$,$H$&$4$6$$$^$7$?!#(B

$B2<5-$N$H$*$j$G$-$^$7$?!#(B

$B!J8m$^$jEy$"$j$^$7$?$i!"$4;XE&$$$?$@$1$l$P9,$$$G$9!K(B


$B%3!<%G%#%s%0!'(B
#! /usr/local/bin/perl

sub d_and_f {
local($l_dir, *l_dirs, *l_files, *l_nd, *l_nf) = @_;
@l_dirs[0] = 10;
@l_dirs[1] = 20;
$l_nd = 2;
}

&d_and_f($dir, *dirs, *files, *nd, *nf);
for($i=0; $i<$nd; $i++){
print "$i $dirs[$i]\n";
}

$B<B9T7k2L!'(B
$t.pl
0 10
1 20
$
