Hacker News new | ask | show | jobs
Show HN: Perl script that mounts a webdav share and backups your MySQL databases (github.com)
3 points by steven_braham 3267 days ago
1 comments

Nice to see you getting into Perl! For these types of tasks it is indeed very powerful and a great fit.

Some suggestions for you to research to further improve your script:

You are using a lot of shell commands in backticks like `rm -rf out && mkdir out`;

This can be very useful if you want to capture the output of such commands, but it also runs the commands in separate processes using the shell programs. For much of what is in your script you can just use Perl! :)

Read up on core modules like Archive::Tar and the various IO::* modules to start using pure Perl for what you need to do. http://perldoc.perl.org/index-modules-A.html

Good books to read would be Modern Perl by chromatic or Beginning Perl by Ovid.