pglenski has asked for the wisdom of the Perl Monks concerning the following question:
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";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: what does the brace do
by ikegami (Patriarch) on Nov 05, 2007 at 20:16 UTC | |
|
Re: what does the brace do
by gamache (Friar) on Nov 05, 2007 at 20:12 UTC | |
|
Re: what does the brace do
by Fletch (Bishop) on Nov 05, 2007 at 20:30 UTC |