Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Payment changer

by Forsaken (Friar)
on Dec 29, 2004 at 00:29 UTC ( #417894=note: print w/ replies, xml ) Need Help??


in reply to Payment changer

1 small comment i'd like to make is on the following part:

sub add { my $self = shift; my @units = @{ $self->{units} }; my %pieces = %{ $self->{bills} }; my $temp = shift;
I personally use the guideline that it's best to clean out @_ and assign all the values that i need before doing anything else. 9 out of 10 times this is completely unnecessary, but consistently doing it does prevent me from leaving things in @_ only to have them changed later, yielding unpredictable results. so my advice would be to start off with my ($self, $temp) = @_; and then to proceed with the remainder of the sub.


Comment on Re: Payment changer
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://417894]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (9)
As of 2015-07-02 05:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (27 votes), past polls