Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

If you believe in Lists in Scalar Context, Clap your Hands

by gone2015 (Deacon)
on Oct 23, 2008 at 17:44 UTC ( [id://719099]=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        @foo = ('cc', '-E', $bar);
    
  2. or download this
        $foo = ('cc', '-E', $bar);
    
  3. or download this
        $foo = @foo;                # $foo gets 3
    
  4. or download this
      @r = () ;
      @r = undef ;               # sets $r[0] = undef 
    ...
      @w = @r{'k'..'p'} ;
      @p = 'k'..'p' ;
      @w = @r{@p} ;
    
  5. or download this
      $r = () ;                  # Case 1 -- $r -> undef
      $r = 1234 ;                # Case 2 -- $r -> 1234
    ...
      $u = $r[@q] ;              # Case 7 -- $r -> 'n'
      $w = @r{'k'..'p'} ;        # Case 8 -- $w -> 16
      $w = @r{@p} ;              # Case 9 -- $w -> 16
    
  6. or download this
      $r = @r ;       # Case 1 -- $r -> 26
      $v = %r ;       # Case 2 -- $r -> 19/32
      $r = (@r) ;     # Case 3 -- $r -> 26
      $v = (%r) ;     # Case 4 -- $r -> 19/32
    
  7. or download this
      $r = (@r, @r) ;
      $v = (%r, %r) ;
    
  8. or download this
      return ($a, $b, $c, $d) ;
    
  9. or download this
      my @return = () ;
      ...
    ...
      push @return, $c, $d ;
      ...
      return @return ;
    
  10. or download this
      $r = () = 1..27 ;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://719099]
Approved by SankoR
Front-paged by Erez
help
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found