Try something like this instead.  You should always use native perl
calls to get the job done.  Also, this isn't something to discuss in the
dbi-user list.

opendir(DIR, $dirname) or die "can't opendir $dirname: $!";
while (defined($file = readdir(DIR))) {
    if( -f "$dirname/$file" && "$dirname/$file" =~ /\.xml$/ ){
        # do something with "$dirname/$file"
    }
}
closedir(DIR);

-----Original Message-----
From: Vamsi_Doddapaneni [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 09, 2005 4:16 AM
To: CAMPBELL, BRIAN D (BRIAN); [email protected]
Subject: /usr/bin/ls: 0403-027 The parameter list is too long
Importance: High

Hi all,

Thanks for your help.

I am facing a new problem.

Here is the code part:
 foreach $name(`ls $opt_i/*.xml`){
    chomp;
    push @f, $name;
        print "pushing elements=$name\n";
}
[EMAIL PROTECTED];

Now in the directory $opt_i if there are some 10 , 20 or even 100 its
working  well. But now I have some 305 odd xmls and the code is EXITING
WITH


sh: /usr/bin/ls: 0403-027 The parameter list is too long.


In unix prompt ls *.xml is working (giving out those 305 xmls)

Could anybody help me out?

Thanks and Regards
VAMSI
Satyam computers ltd


DISCLAIMER:
This email (including any attachments) is intended for the sole use of
the intended recipient/s and may contain material that is CONFIDENTIAL
AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or
copying or distribution or forwarding of any or all of the contents in
this message is STRICTLY PROHIBITED. If you are not the intended
recipient, please contact the sender by email and delete all copies;
your cooperation in this regard is appreciated.

Reply via email to