Hi,

I have a variable for which I ultimately want to substitute w/ some
math. Is there a way to get the result "6"?

my $number=123;
$number =~s/123/1+2+3/s; #This method results in "1+2+3", not the "6"
I am looking for
print "$number";


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to