[Perl-unix-users] Re: Capturing an evaluated pattern matching

2004-03-31 Thread michael higgins
Francis Paulin wrote: Hi, I'm trying to capture an evaluated pattern matching. The code sample looks like that: # In the real script, these two scalars received their values from external files $stringFromFirstFile = "Test: trying to capture this part of the string"; $stringFromSecondFile = "^Te

RE: [Perl-unix-users] Capturing an evaluated pattern matching

2004-03-31 Thread Francis Paulin
Thanks that works really well. I was complicating my life by using the eval... Thanks again Francis -Original Message- From: Matt Schneider [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 31, 2004 11:54 AM To: Francis Paulin; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [Perl-unix

RE: [Perl-unix-users] Capturing an evaluated pattern matching

2004-03-31 Thread Matt Schneider
I was able to get this to work by just doing normal regular expression matching. $stringFromFirstFile = "Test: trying to capture this part of the string"; $stringFromSecondFile = "^Test: (.*)"; ($capture) = $stringFromFirstFile =~ /$stringFromSecondFile/; print "$capture\n"; Matthew Schneider

[Perl-unix-users] Capturing an evaluated pattern matching

2004-03-31 Thread Francis Paulin
Hi, I'm trying to capture an evaluated pattern matching. The code sample looks like that: # 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 wh