TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Perl script that mounts a webdav share and backups your MySQL databases

3 点作者 steven_braham将近 8 年前

1 comment

vgy7ujm将近 8 年前
Nice to see you getting into Perl! For these types of tasks it is indeed very powerful and a great fit.<p>Some suggestions for you to research to further improve your script:<p>You are using a lot of shell commands in backticks like `rm -rf out &amp;&amp; mkdir out`;<p>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! :)<p>Read up on core modules like Archive::Tar and the various IO::* modules to start using pure Perl for what you need to do. <a href="http:&#x2F;&#x2F;perldoc.perl.org&#x2F;index-modules-A.html" rel="nofollow">http:&#x2F;&#x2F;perldoc.perl.org&#x2F;index-modules-A.html</a><p>Good books to read would be Modern Perl by chromatic or Beginning Perl by Ovid.