Help for this page

Select Code to Download


  1. or download this
    my $section = 0;  my @sectone;  my @secttwo;
    while(<TEXTFILE>) {
    ...
                print "No section defined for: $_\n";
            }
        }
    
  2. or download this
    my $section = 0;  my @sectone;  my @secttwo;
    while(<TEXTFILE>) {
    ...
                print "No section defined for: $_\n";
            }
        }
    
  3. or download this
    my $section = 0;
    my %sections = (1 =>[],2=>[]);
    ...
                print "No section defined for: $_\n";
            }
        }
    
  4. or download this
    my $section = 0;
    my %sections = (1 =>[],2=>[]);
    ...
        warn "No section defined for: $_\n";
    # cause warn gives you $. in <TEXTFILE>
    }
    
  5. or download this
    my $section = 0;  my @sectone;  my @secttwo;
    while(<TEXTFILE>) {
    ...
                warn "No section defined for: $_\n";
            }
        }
    
  6. or download this
    my $section = 0;
    my %sections = (1 =>[],2=>[]);
    ...
                         and next()}}
        ,$_;
    }
    
  7. or download this
    my $section = 0;
    my %sections = (1 =>[],2=>[]);
    ...
    warn "No section defined for: $_\n" unless $sections;
    push @{$sections{$sections}},$_
    }
    
  8. or download this
    my $section = 0;
    my %sections = (1 =>[],2=>[]);
    ...
                         and next() )}}
        ,$_;
    }