#!/usr/bin/perl -w
use strict;
use List::MoreUtils qw(each_array);
sub usage {
    print "Usage: $0 [file1] [file2]\n";
    exit;
}
open(FILE1,$ARGV[0]) and open(FILE2,$ARGV[1]) or usage();
my @ary1 = <FILE1>;
my @ary2 = <FILE2>;
if ( scalar(@ary1) == scalar(@ary2) ) {
    my $ea = each_array(@ary1, @ary2);
    while ( my ($a, $b) = $ea->() )   { 
        chomp($a); 
        print join(',',$a,$b); 
    }
}
