Jim Hansen wrote: > Sorry. Lousy explanation. I have a string that will have > PSserver01...02, etc. I need to check for this string: > > $Printserver = "HP4000 [PSserver01]" > > I guess this can be as simple as > > $Printserver = "HP4000 [PSserver01]" > > if ( ! /PSserver/ ) {
This is checking $_ rather than $Printserver. > do > > } I would have used : $Printserver = "HP4000 [PSserver01]" if ($Printserver =~ /\[PSserver\d+\]/) { -- ,-/- __ _ _ $Bill Luebkert Mailto:[EMAIL PROTECTED] (_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/ -/-' /___/_<_</_</_ http://dbecoll.tripod.com/ (My Perl/Lakers stuff) _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs