On Wed, May 09, 2001 at 01:50:24PM -0400, [EMAIL PROTECTED] wrote:
> #!user/local/bin/perl -w
> 
> open TRY , "try.txt";
> 
> while (<TRY>) {
>       (my $b=$_) =~ s/^(\() (\w+)/$2/;
>       print $b;
> }
> 
> Thank you for humiliating me with this simple question.

Any time.

#!/usr/bin/perl -w
use strict;
open(TRY,"try.txt") or die qq[unable to open "try.txt": $!];
while (<TRY>)
{
    my ($b) = /\(\w+ = (\w+)\)/;
    print $b, "\n";
}
__END__
(name = john)

-- 
Just Another Perl Hacker.

Reply via email to