Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: Refactoring Perl #7 - Remove Assignments to Parameters

by agianni (Hermit)
on Aug 24, 2007 at 12:51 UTC ( [id://634849]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub discount{
        $_[0]->{input_val} -= $_[0]->{input_val} > 50 ? 2 : 0;
    ...
        $_[0]->{input_val} -= $_[0]->{year_to_date} > 10000 ? 4 : 0;
        return $_[0]->{input_val};
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-20 15:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found