Re: --compare current date file with previous day



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)

.



Relevant Pages

  • Re: if statement
    ... The zero argument tells Matchto return the first *exact* match. ... > There can be 6 different numbers in the target evaluation cell and I want ... > compare it 6 different ways and if it matches the correct value compared ... > can't get it to string together more than the one comparison. ...
    (microsoft.public.excel.misc)
  • Re: writing a two hour movie script
    ... You're an idiot, appropriately named "Zero". ... includes TV movies and small companies. ... but to top it all off, you don't compare the number of aspiring ... agent in Florida on the Net who sold the book for him. ...
    (misc.writing)
  • Re: Why is "False" = "-1"?
    ... A must be compared to zero or some other ... (Excepting perhaps for a dumb compiler and I ... dumb--actually a couple of his examples show better code generation than ... the machine instruction to compare to--whether it's zero or nonzero ...
    (microsoft.public.vb.general.discussion)
  • Re: Well Ordering the Reals
    ... >>> If you do not specify the number of bits, then you don't know what number ... >>> number in order to compare it with another number. ... A TO-number starting with a zero and having infinitely many zeros ... So how does one tell, strictly from their representations, which is ...
    (sci.math)
  • Re: This calculation is just wrong / computer cant count!
    ... result is displayed on the screen (in an edit boxes) along with all the ... You cannot perform floating point math on a computer and compare the ... considered zero. ...
    (microsoft.public.vc.mfc)