joelw has asked for the wisdom of the Perl Monks concerning the following question:
Perl gives me the following error:if( $#ARGV == 0 ) { my ($date) = $ARGV[0]; } else { # obtain the date from the previous day in the format YYYYMMDD my($yr,$mo,$day) = (localtime( time - 60*60*(12+(localtime)[2])))[5 +,4,3]; #my $date = sprintf "%04d%02d%02d",1900+$yr,1+$mo,$day; # for test purposes!!! my $date = "20010912"; } # Output the header to the info file. # ----------------------------------- print OUTREP "\nThe following trades from " . $date . " finished with + a ticket status of 11\n\n";
Global symbol "date" requires explicit package name at ebOrdHist.pl li +ne 60. Execution of ebOrdHist.pl aborted due to compilation errors.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Copying a value from an element in the ARGV array to a variable...
by arturo (Vicar) on Sep 17, 2001 at 19:54 UTC | |
Re: Copying a value from an element in the ARGV array to a variable...
by davorg (Chancellor) on Sep 17, 2001 at 19:40 UTC | |
Re: Copying a value from an element in the ARGV array to a variable...
by mr.nick (Chaplain) on Sep 17, 2001 at 20:02 UTC |