I have altered a script I found. I use it to export my users from my bulletin board to DBMan's .pass file. DBMan does not like the spaces in the usersID. I need to add a line of code to my script that will strip the space and add the underline character in its place prior to output to my .pass file. Here is the code I am working with.
FROM w3t_Users
EOS
my $sth = $dbh->prepare($statement);
my $rv = $sth->execute();
my $record;
while ($record = $sth->fetchrow_arrayref() ) {
print OUTFILE "$record->[0]:$record->[1]:$record->[2]:$record->[3]:$record->[4]:$record->[5]:$record->[6]\n";
}I am a perl illiterate, so please be gentle in your answer. I think I understand how the lines of my script work, but only because I got educated guesses. I really would not know how to implement any commands.
Thanks
Dale
Code:
SELECT U_Username, U_Password, U_DBView, U_DBAdd, U_DBDelete, U_DBModify, U_DBAdmin FROM w3t_Users
EOS
my $sth = $dbh->prepare($statement);
my $rv = $sth->execute();
my $record;
while ($record = $sth->fetchrow_arrayref() ) {
print OUTFILE "$record->[0]:$record->[1]:$record->[2]:$record->[3]:$record->[4]:$record->[5]:$record->[6]\n";
}
Thanks
Dale