in reply to Firebird databases backup script
Don't shell out to cd, use chdir
single quotes do not interpolate, so print 'cd $fbbin' prints literally cd $fbbin not cd /opt/firebird/bin
This is where you syntax error was, you were missing a closing single quote
Don't do localtime date math yourself, use strftime
use POSIX(); print POSIX::strftime('%Y-%m-%d-%H-%M-%S', localtime);
Don't shell out to ls, use glob function, so my @files = glob "*.$type";
Thats it :)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Firebird databases backup script
by Mery84 (Novice) on Feb 28, 2012 at 15:21 UTC | |
by Anonymous Monk on Feb 28, 2012 at 16:16 UTC |
In Section
Seekers of Perl Wisdom