#!/usr/bin/perl use strict; # use warnings; use XML::LibXML; use Spreadsheet::ParseExcel; use Spreadsheet::WriteExcel; use File::Copy; use File::Glob ':glob'; use Data::Dumper; my $paramcount = scalar @ARGV; if ( 0 == $paramcount || $paramcount < 3) { print "Usage: perl hunt.pl \n\n"; exit; } my $i_sheet = $ARGV[0]; my $search_folder = $ARGV[1]; my $out_folder = $ARGV[2]; # sanity check and preparation.... unless ( -d $search_folder ) { print "Input folder does not exist \n"; exit; } unless ( -f $i_sheet ) { print "Input excel does not exist \n"; exit; } unless ( -d $out_folder ) { print "Out folder does not exist \n"; exit; } # prepare log file... open( LOG, ">> huntlog.log") || die("Could not open log file!"); print LOG "Log start... \n";