Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: my $x or my ($x)

by nferraz (Monk)
on Apr 04, 2006 at 18:53 UTC ( #541208=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub foo {
        my ( $x, $y, $z ) = @_;
        # ...
    }
    
  2. or download this
    sub say {
        my ( $x, %param ) = @_;
    ...
    }
    
    &say( "Hello", name => "world" );  
    
  3. or download this
    sub bar {
        my ( @a, @b ) = @_; # wrong!
    ...
    }
    
    &bar( @array1, @array2 ); # wrong!
    
  4. or download this
    sub bar {
        my ( $a_ref, $b_ref ) = @_; # ok
        # ...
    }
    &bar( \@array1, \@array2 ); # ok
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2014-11-26 00:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (160 votes), past polls