Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uunet!munnari.oz.au!murtoa.cs.mu.oz.au!ditmela!yarra!melba.bby.oz.au!leo!gnb From: gnb@bby.oz.au (Gregory N. Bond) Newsgroups: comp.lang.perl Subject: Re: Is there an easy way around this problem? Message-ID: Date: 12 Feb 90 22:44:12 GMT References: <237@cmic.UUCP> <5349@convex.convex.com> Sender: news@melba.bby.oz.au Organization: Burdett, Buckeridge and Young Ltd. Lines: 22 In-Reply-To: tchrist@convex.COM's message of 12 Feb 90 04:27:08 GMT $dir = "/users/garvey/tmp/archive/tmp"; foreach $afile (<$dir/*>) { print ($afile, "\n"); } Yep, an arg length problem. You can increase the number of names b doing something like $dir="/users/garvey/tmp/archive/tmp"; chdir($dir); foreach $afile (<./*>) { print $afile, "\n"; } which will avoid a copy of $dir in each expansion and (approx!) triple the number of directories matched in this case. Greg. -- Gregory Bond, Burdett Buckeridge & Young Ltd, Melbourne, Australia Internet: gnb@melba.bby.oz.au non-MX: gnb%melba.bby.oz@uunet.uu.net Uucp: {uunet,pyramid,ubc-cs,ukc,mcvax,prlb2,nttlab...}!munnari!melba.bby.oz!gnb