in reply to Re^2: backup for the users on the system in linux enviroment
in thread backup for the users on the system in linux enviroment
Put a use diagnostics; line at the beginning of your code, and you'll get a verbose explanation of this (or any other) message. Or look for the message in perldiag.Global symbol "$file" requires explicit package name at ./backup.pl li +ne 9.
you mean i will change values in values('$username','$x','$userid','$groupid','$realname','$homedir','$shellpath')") to values(?,?,?,.....) ?I mean do something like (example taken from biograd's scratchpad):
# before your loop $sth_achroms = $dbh -> prepare( " INSERT INTO achroms (type, ac_id, length, chr_num, chr_strt, chr_end, bac_strt, bac_end, orient) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?) "); # later, inside your loop $sth_achroms -> execute( $achrom[0],$achrom[1],$achrom[2], $achrom[3], $achrom[4], $achrom[5], $achrom[6], $achrom[7], $achrom[8]);
|
|---|