----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 09, 2001 7:50 PM
Subject: Very beginner question
<snip>>
> if I am trying to just extract "john" for the value $b, why would the
> following script not work. I thought it would take bothIt returns the
> full (name=john)
<snip>
> while (<TRY>) {
> (my $b=$_) =~ s/^(\() (\w+)/$2/;
> print $b;
> }
you are matching a "(" at the beginning of the line, followed by a
whitespace followed by one or more word characters.
As you can see, there is no such thing in yuor input.
try this:
# remove any characters follwed by an erqual sign and an optional whitespace
or a right bracket from $_
while (<TRY>) {
s/.*=\s?|\)//g;
print "$_\n";
}