Gurus-

I'm trying to help a co-worker on reg exp/pattern match issue.

we have a set of items to go through and another set of input that's 
tested against the first.

we need to check that items in the second set are a one-for-one match or 
subset of the latter.


ie:

$var1 =~ /$var2/

where this returns true in a case such as $var1=Jose, Joseph, and Josh and 
$var2 will be James and Joseph

when $var2 is James they need to return false and when it is Joseph both 
Jose and Joseph should return true while Josh returns false.

So far we haven't found a solution in orielly and trying

if( $var1 =~ m/$var2/) { print "$var2 contains $var1\n"; }
else { print "failure on $var2 and $var1\n"; }


has failed to work.

-Josh
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to