Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: making 3 files into one

by Lawliet (Curate)
on Feb 17, 2009 at 17:43 UTC ( #744491=note: print w/ replies, xml ) Need Help??


in reply to making 3 files into one

I would open each file and store them in separate arrays where each element of an array is a single line in the corresponding file. Open a fourth file for writing and use a for loop to print each element of each array.

for (my $i = 0; $i < $#file; $i++) { print FILE "$file[$i] $file2[$i] $file3[$i]\n"; }

Or something~

And you didn't even know bears could type.


Comment on Re: making 3 files into one
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://744491]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2014-07-10 05:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (199 votes), past polls