Hi, you ment system() wen you said exec()!
perldoc -f system perldoc -f exec for short: exec() replaces the perl process. system() invokes your myslqdump process and waits till it is finished. HTH Martin On Fri, 15 Jun 2007 15:17:03 -0000 [EMAIL PROTECTED] wrote: > 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/