-----Original Message----- >From: Jay Savage <[EMAIL PROTECTED]> >Sent: Aug 2, 2007 5:29 AM >To: Perl List <beginners@perl.org> >Subject: Re: parsing a log file by date > >'2 == 2' is a Perl test for numeric equality, which has nothing to do >with string comparisons. '1 = 1', on the other hand, is a statement of >fact. >
I notice that in shell we can say '1 = 1' and this is true. but in perl we can't say 1=1. $ perl -e 'print "true" if 1=1' Can't modify constant item in scalar assignment at -e line 1, at EOF Execution of -e aborted due to compilation errors. $ if [ 1 = 1 ];then echo "true";fi true OT: Why shell support this strange attribute? -- http://home.arcor.de/jeffpang/ http://home.earthlink.net/~pangj/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/