Date: Fri, 13 Jul 2001 09:58:55 +0100 From: "Andrew" Subject: Re: List files in a directory Message-Id: <9imd8n$fav$1@kermit.esat.net> "JJ" wrote in message news:9im8me$jkh$1@vg170.it.volvo.se... > Hi, > > I need to get all files in a directory that have the suffix *.sql and store > then in a array. > > But how? > > Best regards > Joacim Jarkeborn You could try this: #!/usr/bin/perl use strict; my @files; while(<*.sql>) { push @files,$_; } for (0..$#files) { printf "$files[$_]\n"; } Andrew