http://qs321.pair.com?node_id=835979

Bheema_Tyco has asked for the wisdom of the Perl Monks concerning the following question:

Hi I am new to Perl

i have initial variable like

my $ini=4; my $last=2;

i am creating hash in the following way

my %result=( SAS1=>$ini-$last, SAS2=>$last-$ini, SAS3=>$ini-$last );

then i am printing the hash values

O/P will be like this

2

-2

2

OK

now i wants to change the value of variable like

my $ini=10; my $last=5;

Now my problem is whenever i change the those variable

then those values should reflect in the hash %result

and whenever i print the hash it should display the latest result like

5

-5

5

can anybody help me :-)