Help for this page

Select Code to Download


  1. or download this
    my %totals;
    while ( <DATA> ) {
       chomp;
    ...
    21
    player1
    22
    
  2. or download this
    player1: 66
    player2: 31
    
  3. or download this
    while ( <DATA> ) {
       if ( /^([A-Z]+)$/ ) { print "In if:   $1\n"; }
       else { print "In else: $1\n"; }
    ...
    xyz
    BAR
    dfgdfg
    
  4. or download this
    In if:   FOO
    In else: FOO
    In else: FOO
    In if:   BAR
    In else: BAR
    
  5. or download this
    __DATA__
    FOO
    1234
    Xyz
    BAR
    DFGdfg
    
  6. or download this
    In if:   FOO
    In else: FOO
    In else: F
    In if:   BAR
    In else: B