> 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";
Run this program and see if you can see wha
On Sat, Dec 20, 2008 at 01:04, hotkitty wrote:
> 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
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