> Bryan Harris wrote:
> 
> I'm interested in doing the equivalent of a horizontal "cat" on a
> bunch of files.  That is, instead of listing them one after another,
> I'd like them "cat"ted next to each other horizontally (tab
separated).
>
> I'd like it to be able to work on any number of files, and they
> might be huge (20+ MB).  I was thinking it'd be good to open up all
> the files at once, and write out the new file one line at a time,
> but I can't figure out how to set up an array of filehandles. 
> I'm not sure if that's the easiest way...

One particular thing to watch -- most systems have a limit on how many
filehandles a process can have open at a time. To see your max, (and as
a template for another solution), try this:

use FileHandle;
while ($_ = new FileHandle ">deleteme") {
   push @_, $_;
   unlink "deleteme";
}
print scalar @_,"\n";

Our HP midrange says 57. :)


__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com

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

Reply via email to