The stupid question is the question not asked | |
PerlMonks |
Re^3: Firebird databases backup scriptby Mery84 (Novice) |
on Mar 02, 2012 at 09:48 UTC ( [id://957421]=note: print w/replies, xml ) | Need Help?? |
Thank you. Now I see where I`m wrong. More than one result is output of glob but I insert them to variable but should be inserted to table. I`ve fixed it to @files but still first element of @files table is empty. The output: The script dies at first element because gbak can`t perform backup on empty file as source. For now to cut out the first empty element from @files i`ve just used shift(@files); but I`m not sure is this a good idea. I don`t know why it push first element empty to @files and if in some conditions e.g. on other server the first element will not be empty the shift will be cutting out one of databases from backup. Is there a better way to check array for empty elements and if exist shift them? I have two ideas - insert if in foreach loop or do another one foreach loop for @files to remove the empty elements. In both ideas I don`t know how to correctly detect empty elements.
In Section
Seekers of Perl Wisdom
|
|