#!/usr/bun/perl #------------------------------ # This script searches for "search" # and adds lines from fileSource to fileOutput use warnings; use strict; #use Fcntl (:flock :seek); # Check unless(-e $ARGV[0] || -e $ARGV[1]){ print("Please Enter A Valid File Name\n"); exit 1; } #if($ARGV[0] == "--help"){ # print("Usage is:\n"); # print("perl conference_add.pl "); #} # assigns file path to local variables my($fileSource) = $ARGV[0]; my($fileOutput) = $ARGV[1]; my(@inputLines); # opens files for reading/writing open(FILESOURCE, "<", $fileSource) || die("Can not open $fileSource $!"); open(FILEOUT, ">>", $fileOutput) || die ("Can not open $fileOutput $!"); @inputLines = ; print FILEOUT @inputLines; close(FILESOURCE); close(FILEOUT);