if ((length($companyname)>0) && ($anotherstring eq 'DOIT')) { ... }