Hi, I'm trying to capture an evaluated pattern matching. The code sample looks like that:
<snip> # In the real script, these two scalars received their values from external files $stringFromFirstFile = "Test: trying to capture this part of the string"; $stringFromSecondFile = "^Test: (.*)" # That's why I will try to use an eval here: $expression = "\"$ stringFromFirstFile \" =~ /" . $ stringFromSecondFile. "/"; # This work whenever $ stringFromFirstFile starts by "Test:" (eval return 1) if (eval($expression)) { # Wants to capture the (.*) of $ stringFromSecondFile but $1 is always empty $capture = $1; # Does not work } <snip> Someone knows how I can fix this? Thanks Francis Paulin _______________________________________________ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs