Re: --compare current date file with previous day
- From: "Shahriar" <rahman77@xxxxxxxxx>
- Date: 28 Sep 2006 13:14:43 -0700
David,
This is the code is the report file is in format of month&day
(ex:0925).
my %log = map { $_ => UnixDate($_, Report_%m%d.rpt) } qw{ today
yesterday };
What will be the format if that portion is generated as random numbers?
(like 1234 or 4561 something like that?
Thanks.
usenet@xxxxxxxxxxxxxxx wrote:
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)
.
- References:
- Re: --compare current date file with previous day
- From: Shahriar
- Re: --compare current date file with previous day
- From: usenet
- Re: --compare current date file with previous day
- Prev by Date: Re: interpoliation within regexp
- Next by Date: Re: interpoliation within regexp
- Previous by thread: Re: --compare current date file with previous day
- Next by thread: perl question
- Index(es):
Relevant Pages
|
|