biswanath_c has asked for the wisdom of the Perl Monks concerning the following question:
#!/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 <excel sheet> <search folder> <output f +older>\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";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: writing to a log file....
by toolic (Bishop) on Nov 04, 2009 at 22:27 UTC | |
|
Re: writing to a log file....
by affc (Scribe) on Nov 04, 2009 at 22:34 UTC | |
|
Re: writing to a log file....
by Argel (Prior) on Nov 05, 2009 at 00:14 UTC | |
|
Re: writing to a log file....
by Bloodnok (Vicar) on Nov 04, 2009 at 23:17 UTC | |
|
Re: writing to a log file....
by kikuchiyo (Hermit) on Nov 05, 2009 at 10:52 UTC |