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

Re: Use 2 files and print each line of each one side-by-side

by Kenosis (Priest)
on Feb 18, 2014 at 19:05 UTC ( [id://1075366]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    
  2. or download this
    open $USER1, '<', $userfile1 or die "Couldn't open file: $userfile1 - 
    +$!";
    ...
    while(<$USER1>) { ...
    
  3. or download this
    open $OUT, '>', "CONCATENATED_FILES";
    ...
    open $USER1, '<', $userfile1;
    
  4. or download this
    use autodie;
    
  5. or download this
    use strict;
    use warnings;
    ...
        last if !defined $file1[$i] or !defined $file2[$i];
        print "$file1[$i]\t$file2[$i]\n";
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (6)
As of 2024-04-24 11:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found