Followup,
Here's the content of my script. When I run it, I got an or as in my previous post. Any ideas?
#!/usr/bin/perl
use DBI;
my $dbh = DBI->connect ("DBI:mysql:vpopmail:localhost", "username","password")
|| die "Could not connect to database:"
. DBI-> errstr;
my $sql_stmnt = "SELECT pw_name, pw_clear_passwd FROM kids_table";
my $sth = $dbh->prepare($sql_stmnt);
$sth->execute();
while (my($pw_name, $pw_clear_passwd) = $sth->fetchrow_array()) {
system "/home/vpopmail/bin/vadduser $pw_name\@domain.com.ph $pw_clear_passwd\n";
}
|