/ Published in: Perl

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/usr/bin/perl $username = 'root'; $password = 'root'; $pattern = 'tmpdb'; $filename = '/tmp/tmpdb.txt'; $mysql = '/opt/local/bin/mysql5'; $show_command = "$mysql -u$username -p$password -e 'show databases;' > $filename"; $delete_command = "$mysql -u$username -p$password -e 'drop database "; @databases = <INPUT>; foreach (@databases){ if (/$pattern/) { } }
Comments
