Help for this page

Select Code to Download


  1. or download this
    N_scalars("foo",5);
     --yields--
    ...
    $foo_3 = '';
    $foo_4 = '';
    $foo_5 = '';
    
  2. or download this
    my @foo;
    
  3. or download this
    open FH, 'foo.txt' or die "$!: can't open foo.txt\n";
    my @file = <FH>;
    close FH;
    
  4. or download this
    foreach my $line (@file) {
       print $line;
    }
    
  5. or download this
    foreach (@file) {
        print $_;
    }
    
  6. or download this
    print foreach @file;
    
  7. or download this
    print @file;
    
  8. or download this
    for my $i (0..$#file) {
       print $file[$i];
    }
    
  9. or download this
    for (0..$#file) {
        print $file[$_];
    }
    
  10. or download this
    print for @file;
    
  11. or download this
    print @file;
    
  12. or download this
    arb_scalars("alfa","bravo","charlie");
      --yields--
    $alpha = '';
    $bravo = '';
    $charlie = '';
    
  13. or download this
    my %word = (
       alpha   => 'a',
       bravo   => 'b',
       charlie => 'c',
    );
    
  14. or download this
    print $word{'charlie'};