Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Answer: Bad file description for win32/bash/perl combo

by Coyo (Initiate)
on May 16, 2000 at 04:01 UTC ( #11777=categorized answer: print w/replies, xml ) Need Help??

Q&A > input and output > Bad file description for win32/bash/perl combo - Answer contributed by Coyo

Too many files!

Well, I may not have answered the question, but I have found that even putting too large of a string into a backtick operation causes the 'Bad file descriptor' error.

`wc $lots_of_files`;
does not work. It can be broken up so to be made to work:
@lots_of_files = split($lots_of_files);

$third = $#lots_of_files;

$a = join(' ', @lots_of_files [0..$third] );

$a = join(' ', @lots_of_files [1+$third..2*third]);

$a = join(' ', @lots_of_files [1+2*$third..$#lots_of_files] );

`wc $a`;

`wc $b`;

`wc $c`;

Well, that seems to work. It doesn't explain why redirection is failing for me in just about all cases though.

Maybe this is usefull to someone.


  • Comment on Answer: Bad file description for win32/bash/perl combo
Log In?

What's my password?
Create A New User
LanX what?
marto deletes himself from the all lists
QM deletes himself from all delete lists
LanX passes the blame to jdpatches. ..
Eily the verb from this sentence
[LanX]: jdporter adjusted the best nodes algorithm not long ago to public demands, my theory more complicated= more error prone

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (11)
As of 2018-03-20 10:14 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (249 votes). Check out past polls.