Re: help with syntax using an if statement

2007-07-05 Thread Daluk
On 5 Jul, 00:24, [EMAIL PROTECTED] (Ken Foskey) wrote: > On Wed, 2007-07-04 at 19:00 +0200, Martin Barth wrote: > > Hi > > > > if (($DeviceType eq "Switch") || ($DeviceType eq "Router") || > > > ($DeviceType eq "Hub") || ($DeviceType eq "Access point")) > > > > what i would like to do is check each

Re: help with syntax using an if statement

2007-07-04 Thread Ken Foskey
On Wed, 2007-07-04 at 19:00 +0200, Martin Barth wrote: > Hi > > > if (($DeviceType eq "Switch") || ($DeviceType eq "Router") || > > ($DeviceType eq "Hub") || ($DeviceType eq "Access point")) > > > > > > what i would like to do is check each device type with where the first > > letter is uppercas

Re: help with syntax using an if statement

2007-07-04 Thread Paul Lalli
On Jul 4, 3:46 am, [EMAIL PROTECTED] (Daluk) wrote: > I have a some code that reads in a file, and then i have some if > statements. The if statement i want to change is > > if (($DeviceType eq "Switch") || ($DeviceType eq "Router") || > ($DeviceType eq "Hub") || ($DeviceType eq "Access point"))

Re: help with syntax using an if statement

2007-07-04 Thread Martin Barth
Hi > if (($DeviceType eq "Switch") || ($DeviceType eq "Router") || > ($DeviceType eq "Hub") || ($DeviceType eq "Access point")) > > > what i would like to do is check each device type with where the first > letter is uppercase or lowercase this should help: if( $DeviceType =~ m/^([Ss]witch|[Rr

help with syntax using an if statement

2007-07-04 Thread Daluk
Hi ppl, I have a some code that reads in a file, and then i have some if statements. The if statement i want to change is if (($DeviceType eq "Switch") || ($DeviceType eq "Router") || ($DeviceType eq "Hub") || ($DeviceType eq "Access point")) what i would like to do is check each device type w