Help for this page

Select Code to Download


  1. or download this
    my $sth = $dbh->prepare('SELECT * FROM [Production Words]');
    $sth->execute;
    ...
    
    my %hash;
    while (my $row = $sth->fetchrow_hashref) {
    
  2. or download this
       my ($str,$num) = $row->{ID} =~ /(\D+)(\d+)/;
       my $new_id = lc($str) . int($num);
    
  3. or download this
       unless ($hash{$new_id}++) {
          # INSERT $row into the new table 
    ...
          # if this redundant old row has better data
       }
    }