Re: --compare current date file with previous day
- From: "Shahriar" <rahman77@xxxxxxxxx>
- Date: 27 Sep 2006 14:14:54 -0700
my %log = map { $_ => UnixDate($_, "Report_%m%d.rpt") }
qw{ today yesterday };
This doesn't work. There will be no " ", then it works. So far looks
great. I can parse the result. Now working to compare the results and
sending email part.
Thanks a lot for your help. Also thanks to jp.
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)
.
- Follow-Ups:
- 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
- From: usenet
- Re: --compare current date file with previous day
- Prev by Date: interpoliation within regexp
- Next by Date: Re: regex help needed
- 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
|
|