in reply to check in an array for variable

I don't quite understand what you are trying to achieve, the expected output would have been helpful.

But I see three problems in your code:

Replies are listed 'Best First'.
Re^2: check in an array for variable
by Anonymous Monk on Aug 13, 2009 at 08:32 UTC
    $line =~ s/(&\w+?;)(\w+)(&\w+?;)/exists $text{$2} ? $2 : defined($2)/eg; I am trying to find the string between two values which is present in array.
    ie; regular expression to find the string between one text in an another to another.