I'm very new to perl, and I'm having trouble with the following script:
#!perl
$firstnum = 3;
$secondnum = 2;
$total = $firstnum + $secondnum;
print $total; ##comes out to 5
$firstnum = 6;
print $total; ##comes out to 5 (I know why) - but I want to come out to 8
How do I write this so...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.