use the glob() function

my @files = glob("$indir/filename");


-----Original Message-----
From: siren jones [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 10:14 AM
To: [EMAIL PROTECTED]
Subject: simple file reading question



I have a file containing a list of names, for example:

S2000123456.met
S2000123457.ozone
S2000123458.hdr
S2000234569.met
   .
   . etc.

I'm looking for a short way to read these filenames onto an array.

I tried:

my @fils = <$indir/filename>;

...... but this just gives me the name of my input file

I can do this, but it seems cumbersome.

     open LF or die "Can not find file: \n $infile $!\n";
      sysread LF, $filename, 50000;
      @imgs = split(/\n/,$filename);
      close (LF);

Thank you in advance.

-s




_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

----------------------------------------------------------------------------
--------------------
The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and opinions of Summit
Systems Inc.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to