Help for this page

Select Code to Download


  1. or download this
    my @x = (1..10);
    foreach (@x) {
    ...
    
    OUTPUT: 
    101 102 103 104 105 106 107 108 109 110
    
  2. or download this
    
    my @x = (1..10);
    ...
    
    OUTPUT: 
    101 102 103 104 105 106 107 108 109 110
    
  3. or download this
     map {$_ += 100} @x;
    
    (yields same output and alters @x as does...)
    ...
    in case you wondered... :)