package Cents; sub TIESCALAR { bless \my $self, shift } sub STORE { ${$_[0]} = $_[1] } sub FETCH { sprintf "%.02f", ${ my $self = shift} } package main; tie $bucks, "Cents"; $bucks = 45.00; print "$bucks\n"; $bucks *= 1.0715; print "$bucks\n";
In reply to what does the brace do by pglenski
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |