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 device type with where the first
> > > letter is uppercase or lowercase
>
> > this should help:
>
> > if( $DeviceType =~ m/^([Ss]witch|[Rr]outer|[Hh]ub|[Aa]ccess point)$/) { ...
>
> Knowing systems:
>
> if( $DeviceType =~ m/^(switch|router|hub|access point)$/i ) {
>
> The i modifier is ignore case.
>
> I think there is a word boundary \< and \> that might be useful rather
> than ^$ as well.
>
> --
> Ken Foskey
> FOSS developer




guys,

thank you very much for your responses..   Martin i used your line and
it worked :-)

Ken, sorry, i got slightly lost on your last comment about the word
boundary?  would you mind explaining for me

thanks
Dal


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to