Could you clarify the question.
Example: If I get the input line
___
I want this output line
___.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Dan
Jablonsky
Sent: Monday, June 18, 2001 2:32 PM
To: [EMAIL PROTECTED]
Subject: computations with backreferences
Hi all,
I have a regex, it's isolating some numbers in each
line of a text file and I want to add some computation
with those numbers on the same line. I know you can
basically stick any function in a regex but I don't
know how. Hence, the code below won't work:
$_=~s/^[A-Z]\t(\d{1,2})\t.*\t(\d{2})\t.*/$1\t$2\t($1+$2)/2/;
The forward slash that would terminate wrongly the
regex is actually a "divide by".
What is the correct way to do it?
Thanks,
Dan
__________________________________________________
Do You Yahoo!?
Spot the hottest trends in music, movies, and more.
http://buzz.yahoo.com/
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users