I'm lost with this question, but try to run:

print("abcd" =~ /(b.)/)

Is this what you need?

Marcos

-----Original Message-----
From: Perl [mailto:[EMAIL PROTECTED] 
Sent: quinta-feira, 24 de Março de 2005 1:42
To: Beginner Perl
Subject: Regex against a scalar


Hi. 

I would like to search a scalar variable and have the output to another
scalar. For example:

$test = "This is some test data";

I want another scalar, $regex to hold the output of a regular expression
lookup against $test.

So something like this:

$regex =~ /test/ running against $test. Is this possible somehow?


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to