Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Returning first element of an array from a function

by davido (Cardinal)
on Mar 17, 2004 at 07:47 UTC ( #337246=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    ( $foo ) = split ( /\./, $bar );
    
  2. or download this
    $foo = ( split ( /\./, $bar ) )[0];
    
  3. or download this
    ( $foo, $boo ) = ( split ( /\./, $bar ) )[ 1, 0 ];
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2023-09-27 06:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?