Jeff Pang wrote:
try the POSIX::strftime,this use the same datetime format as shell's
date command.

perl -e '
use POSIX qw/strftime/;
print strftime("%y%m%d %H:%M",localtime); '

070903 21:51

Okay. All right.

use POSIX qw(strftime);
my $date1 = strftime("%y/%m/%d %H:%M",localtime);
my $FILE = "/home/scripts/backups_db/db-$date1.sql";

Next, I want to use a shell command, so I use the Shell function[2], and
I must use the 'mysqldump' command :

mysqldump -u root -p *** --all-databases > $FILE

How could I use this command with the Shell function ?

[2] : http://perldoc.perl.org/Shell.html



And for this question ?

Regards,

--
Shams Fantar (http://snurf.info)


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to