##
sub STORE{
my $self=shift;
my $data=shift;
$$self = ($data*(9/5)+32);
}
####
sub FETCH{
my $self=shift;
return $$self;
}
1;
####
#!/usr/bin/perl -w
use strict;
use Celcius;
my $temp;
tie $temp, 'Celcius';
$temp = 0;
print "Initial temp is $temp (C)\n";
while(<>) {
chomp;
$temp = $_;
print "Temp is $_ (F) ($temp (C))\n";
}