#!/bin/Perl use warnings; if (@ARGV < 4) { print ("you need to provide 4 arguments\n\t4th argument is file to parse"); exit; } openfile(@ARGV); sub openfile { print $_[3],"\n"; open FILE1,">$_[0]" || die "could not open $_[1]\n"; open FILE2,">$_[1]" || die "could not open $_[2]\n"; open FILE3,">$_[2]" || die "could not open $_[3]\n"; open FILE4,"<$_[3]" || die "could not open $_[4]\n"; while () { print $_; } }