sub Init { my $file1; my $file2; my $tmp; if(defined($opt_h)){ print Syntax(); exit; } $file1 = $ARGV[0]; $file2 = $ARGV[1]; print "\nFirst file - $file1\nSecond File - $file2\n"; if((!defined($file1)) || (!defined($file2))){ print "\nSpecify the correct number of output files!\n"; print Syntax(); exit; } if(!defined($opt_c)){ print "\nNo config file provided, defualt configuration will be used!\n"; init_default_config(); } else { read_config_file(); } if((!(-e $file1)) || (!(-e $file2))){ print "\nEither of specified files does not exist!\n"; exit; }else{ #opening input files for reading open FILE1, $file1 or die "\nCan't open $file1 for reading: $!\n"; open FILE2, $file2 or die "\nCan't open $file2 for reading: $!\n"; } #opening output files for writing open OUTFILE, "results" or die "\nCan't open $file2 for reading: $!\n"; #print the compare header to output file print OUTFILE "CALL-ID\n"; $tmp = "_" x 78; print OUTFILE "$tmp\n"; }