Dave Evans wrote: > On Wed, Jan 03, 2007 at 12:45:50PM -0500, Wakko Warner wrote: > > # perl -e 'print "Its 0\n" if "" == 0' > > Its 0 > > But as every Perl user knows, always "use warnings" or "-w":
I'm actually not in the habit of that =) I don't often do any scripting though. > [EMAIL PROTECTED]:~$ perl -we '1==""' > Argument "" isn't numeric in numeric eq (==) at -e line 1. > [EMAIL PROTECTED]:~$ # perl -we 'print "Its 0\n" if ""=="0"' Argument "" isn't numeric in numeric eq (==) at -e line 1. Its 0 # > It sounds like treating "" as 0, but also emitting a warning (to where? - the > main log presumably) is probably a good compromise. Yes, the one above, I'm giving it 2 strings and doing integer testing on it. Yes, it's a warning and it does work. I'm sure "" eq "0" would be false. -- Lab tests show that use of micro$oft causes cancer in lab animals Got Gas??? -- ## List details at http://www.exim.org/mailman/listinfo/exim-users ## Exim details at http://www.exim.org/ ## Please use the Wiki with this list - http://www.exim.org/eximwiki/
