go ahead... be a heretic | |
PerlMonks |
Re: Feedback on my second scriptby Corion (Patriarch) |
on May 15, 2013 at 09:38 UTC ( [id://1033649]=note: print w/replies, xml ) | Need Help?? |
Two small things:
I would like an improved error message here, like
And at the place where you run rsync, you capture all of its (voluminous) output just to print it out right afterwards:
I would change that to simply use system instead, which will do the printing directly. This would also add error checking so your script signals if the underlying rsync failed:
Of course, if you really want/need to do post-processing of the rsync output, as your chomp indicates, you will need to capture the output as you did.
In Section
Seekers of Perl Wisdom
|
|