Re: --compare current date file with previous day
- From: usenet@xxxxxxxxxxxxxxx
- Date: 27 Sep 2006 11:06:49 -0700
Shahriar wrote:
if ($today[2] eq $yesterday[2])
If you want to compare the second line, you need to do:
if ($today[1] eq $yesterday[1])
because Perl arrays start at zero (so $today[0] is the first line of
the file, and $today[1] is the second line).
has this format: Report_0925.rpt
0925 means Sept 25? Using jp's approach (which I greatly prefer):
my %log = map { $_ => UnixDate($_, "Report_%m%d.rpt") }
qw{ today yesterday };
--
David Filmer (http://DavidFilmer.com)
.
- Follow-Ups:
- Re: --compare current date file with previous day
- From: Shahriar
- Re: --compare current date file with previous day
- From: Shahriar
- Re: --compare current date file with previous day
- References:
- Re: --compare current date file with previous day
- From: Shahriar
- Re: --compare current date file with previous day
- Prev by Date: Re: can you pass an array in a form in Perl
- Next by Date: perl question
- Previous by thread: Re: --compare current date file with previous day
- Next by thread: Re: --compare current date file with previous day
- Index(es):
Relevant Pages
|