in reply to terrible code about array matching...
You could simply say:
if(join(',', @car) eq join(',', @cond)) { print "FOUND\n"; } else { print "NOT FOUND\n"; }
Also, instead of saying:
if ($aa=~/^peace$/)
It would be more efficient to say:
if ($aa eq 'peace')
Please clarify what you're try to do if this doesn't help.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: terrible code about array matching...
by davorg (Chancellor) on Nov 06, 2002 at 10:50 UTC | |
by grantm (Parson) on Nov 06, 2002 at 20:52 UTC | |
|
Re: Re: terrible code about array matching...
by Discipulus (Canon) on Nov 06, 2002 at 08:51 UTC |