Re: numeric comparison always returning true!

2009-09-25 Thread pablo
> and we pointed it out several times to you before you got it. next time > i break out the sledgehammer! :) You did, sorry I missed it. > use warnings is lexically scoped so you can confine it to just the > module, file or block. -w sets the global warnings flag. one major > difference would be

Re: numeric comparison always returning true!

2009-09-25 Thread Uri Guttman
> "p" == pablo writes: p> Thanks for the responses, I appreciate the help. As pointed out, I was p> storing comparing one value and printing another. I guess my initial p> question has been answered: p> Quote: p> "Am I missing something obvious, or is there something wrong here?

Re: numeric comparison always returning true!

2009-09-25 Thread pablo
Thanks for the responses, I appreciate the help. As pointed out, I was storing comparing one value and printing another. I guess my initial question has been answered: Quote: "Am I missing something obvious, or is there something wrong here?" My only remaining question is what's the benefit of

Re: numeric comparison always returning true!

2009-09-24 Thread Chas. Owens
On Sep 24, 2009, at 14:31, pa...@compugenic.com wrote: On Thu, Sep 24, 2009 at 02:16:05PM -0400, Uri Guttman wrote: "p" == pablo writes: p> I have a script that tells me the largest file (in bytes) for each p> extension. I store the largest size in a hash, keyed by the extension.

Re: numeric comparison always returning true!

2009-09-24 Thread Steve Bertrand
pa...@compugenic.com wrote: > On Thu, Sep 24, 2009 at 02:16:05PM -0400, Uri Guttman wrote: >>> "p" == pablo writes: >> p> I have a script that tells me the largest file (in bytes) for each >> p> extension. I store the largest size in a hash, keyed by the extension. >> >> p> The numeric

Re: numeric comparison always returning true!

2009-09-24 Thread Uri Guttman
> "p" == pablo writes: p> Then I tweaked my code as follows: p> if ( $bytes > ($sizes{$ext}->{largest}||0) ) { p> print "$bytes is larger than ", $sizes{$ext}->{largest_size} || 0, "\n"; you missed the important part. fixed a warning like that ignores WHY there is an undef there

Re: numeric comparison always returning true!

2009-09-24 Thread pablo
On Thu, Sep 24, 2009 at 02:16:05PM -0400, Uri Guttman wrote: > > "p" == pablo writes: > > p> I have a script that tells me the largest file (in bytes) for each > p> extension. I store the largest size in a hash, keyed by the extension. > > p> The numeric comparison portion is clearly

Re: numeric comparison always returning true!

2009-09-24 Thread Uri Guttman
> "p" == pablo writes: p> I have a script that tells me the largest file (in bytes) for each p> extension. I store the largest size in a hash, keyed by the extension. p> The numeric comparison portion is clearly not working, since it is returning true every time regardless of the nu

numeric comparison always returning true!

2009-09-24 Thread pablo
I have a script that tells me the largest file (in bytes) for each extension. I store the largest size in a hash, keyed by the extension. The numeric comparison portion is clearly not working, since it is returning true every time regardless of the numbers being compared. Here's a snippet, alo