Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

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

by gone2015 (Deacon)
on Oct 23, 2008 at 17:44 UTC ( #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
Node Status?
node history
Node Type: perlmeditation [id://719099]
Approved by CardinalNumber
Front-paged by Erez
help
Chatterbox?
[Yaerox]: Is LIBNODAVE still the only way to exchange data with Siemens PLCs?

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2017-06-26 13:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (580 votes). Check out past polls.