Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: In What basis the subroutine return values assign to variables ?

by Anno (Deacon)
on Jul 30, 2007 at 10:45 UTC ( [id://629523]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my ($price, $floor) = get_price_floor() || 0;
    
    sub get_price_floor {
      return (10, 8);
    }
    
  2. or download this
    my ($price, $floor) = (get_price_floor() || 0);
    
  3. or download this
    my ($price, $floor);
    (($price, $floor) = get_price_floor()) ||
        (($price, $floor) = ( 0, 0));
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-25 19:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found