in reply to problem in search pattern

Actually i modified the problem and posted it here to make it simple. But that worked. But here goes the actual problem, the string values will be,
$row{test_name} will contain any of these values, "BEFORE-AFTER.etest" "DEFAULT.etest" "ORDER-ROLLBACK.etest" "{PRCIII.etest: logging size 100}" "ROLLBACK.etest" "SIDE-EFFECTS.etest" "SYNTAX.etest" #then i check for PRC if( $row{test_name} =~ "PRC" ) { print "PRC-------"; }
Really this problem is there only with PRC, which is in CURLY braces.
Or can you tell me how to remove the starting and trailing curly braces.

thanks
rsennat

Replies are listed 'Best First'.
Re^2: problem in search pattern
by PreferredUserName (Pilgrim) on Dec 16, 2005 at 13:40 UTC
    As someone said earlier, you want to say:
    $row{test_name} =~ /PRC/
    rather than:
    $row{test_name} =~ "PRC"
    Note the slashes versus quote marks.
Re^2: problem in search pattern
by Happy-the-monk (Canon) on Dec 16, 2005 at 13:42 UTC

    Your data and code still prints the wanted result for me.

    Do you realise you still haven't shown us the part of the code where your error is to be found?

    We are better at tracking errors in code we can see --- than at guessing what might be wrong in the code you do not show.

    Cheers, Sören