Advertisement
Guest User

Untitled

a guest
Jan 29th, 2014
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. use 5.010;
  2. use strict;
  3. use autodie;
  4.  
  5. open(my $fh, '>', 'queries.txt');
  6. say "Starting!";
  7. my $count = 0;
  8. my $min = 56;
  9. my $max = 1000;
  10. for my $i ($min .. $max)
  11. {
  12.     print $fh "INSERT INTO items (id) VALUES ('$i');\n";
  13.     print $fh "DELETE FROM items WHERE id = '$i';" .
  14.         ($i < $max ? "\n" : "");
  15.  
  16.     ++$count;
  17.     say "Query $count processed.";
  18. }
  19. close $fh;
  20. say "Processed $count queries.";
  21. say "Done!";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement