Howdy,

Please be gentle, I'm a perl novice to say the least.

I have the following script (called bk.pl right now) :
foreach $argnum (0 .. $#ARGV) {
        my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime
time;
        exec ("mysqldump --user=*** --password=*** $ARGV[$argnum] > /backups/
$ARGV[$argnum]--$mon-$mday-$year-$hour-$min-$sec.sql");
        exec ("tar czpf $ARGV[$argnum]--$mon-$mday-$year-$hour-$min-$sec.sql
$ARGV[$argnum]--$mon-$mday-$year-$hour-$min-$sec");
}

When I run it (./scripts/bk.pl dbname) it runs the first exec
properly, but it dose not do the second.  I get the error
(Maybe you meant system() when you said exec()?)

Any ideas as to why this is happening?

Thanks,
Jason


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


Reply via email to