At 09:45 PM 4/26/2006 -0400, Cai, Lucy \(L.\) wrote: > return (($Output =~ /.*\(ucmvob\)/s*$/) ? 1 : 0); >$Output ="/vobs/na_mscs_pvob >/ccstore/ecc/vobs_fcis321/na_mscs_pvob.vbs public (ucmvob,replicated)" > >What I want to do is if this tring include word "ucmvob", then return 1, >else return 0.
If u just want the word ucmvob then u don't need any of the rest of the regex u put in there. And I think the outer parenthesis on the return could be messing u up too. Not sure without testing but that could be trying to return an array. This will work: $Output =~ m/ucmvob/ ? return 1 : return 0; If u want to retain ur previous return format then do this: return scalar $Output =~ m/ucmvob/; # returns no. of matches i.e. 1 or 0 -- REMEMBER THE WORLD TRADE CENTER ---=< WTC 911 >=-- "...ne cede malis" 00000100 _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs