Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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 having an uproarious good time at the Monastery: (11)
As of 2015-07-31 13:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (277 votes), past polls