Advertisement
Guest User

Untitled

a guest
May 12th, 2010
854
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. foreach $ciudad(@ciudades){
  2. $gw->city("$ciudad", {language => 'es', encoding => 'utf-8'});
  3. my $current = $gw->current;
  4. @info = ($current->{temp_c});
  5. $temperatura = $info[0];
  6. $sth = $dbh->prepare("INSERT INTO temp_ciudad (city, temperatura) VALUES ('$ciudad', $temperatura)");
  7. if(!defined$sth){
  8. die "Cannot prepare statement: $DBI::errstr\n";
  9. }
  10. else{
  11. $sth->execute();
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement