Help for this page

Select Code to Download


  1. or download this
    foreach (my ($key, $value) = each (%take_counts)) {
        print OUTPUT "$host\t$key\t$value\n";
    }
    
  2. or download this
    my %take_counts = (
         foo => 1,
    ...
    foreach:
        bar    2
        bar    2
    
  3. or download this
    my $dbh = DBI->connect("DBI:mysql:database=$database:host=$host",$db_u
    +ser,$db_pass,{RaiseError=>1})|| die "$DBI::errstr\n";
    
  4. or download this
    my $dbh = DBI->connect("DBI:mysql:database=$database:host=$host",$db_u
    +ser,$db_pass) || die "$DBI::errstr\n";
    
    # or
    my $dbh = DBI->connect("DBI:mysql:database=$database:host=$host",$db_u
    +ser,$db_pass,{RaiseError=>1});