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
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
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
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