Help for this page

Select Code to Download


  1. or download this
    my %opts=(GetOptions(
               'help|?'     => \$help,
    ...
               'user'     => \$user,
               'password'     => \$password
              ));
    
  2. or download this
    GetOptions (\%opts,
          qw(    help|h|?
    ...
                   user=s
                   password=s
              ));
    
  3. or download this
        &Help;
    }
    
  4. or download this
        &Help;
    }
    ...
    else {
            &Help;
    }
    
  5. or download this
    my $dbh;
    my $DSN = "driver={SQL Server};Server=$opts{server};database=$database
    +;";
    ...
    else {
        &Logger("ERROR       - Cannot connect to DB: $dbh->errstr()\n");
    }
    
  6. or download this
    my $query = "select * from sometable";
    my $sth = $dbh->prepare($query);
    ...
        $sth->execute(@$rec);
    }
    $setsth->finish();
    
  7. or download this
    $setsth->execute(@$rec);
  8. or download this
    $sth->execute(@$rec);