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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Cool Perl Tools To Know

35 点作者 Phra超过 14 年前

3 条评论

alexwestholm超过 14 年前
The article references some great modules for those actually writing perl code.<p>For those that never learn to write full apps in perl, there are still a few gem 1-liners that are worth tucking away. For instance,<p>perl -pi.bak -e 's/something/something_else/g' *.erl<p>would act as a global substitution with backups (any file changed would have an original x.erl.bak).<p>A list of some other useful 1-liners can be found here: <a href="http://blog.ksplice.com/2010/05/top-10-perl-one-liner-tricks/" rel="nofollow">http://blog.ksplice.com/2010/05/top-10-perl-one-liner-tricks...</a>
hsmyers超过 14 年前
I've changed my whole style of programming using Data::Dumper::Simple It does the obvious, but instead of a more or less anonymous (unless you use extra key strokes) dump of a given variable, Simple allows named dumps of multiple values one per line (complex structures arrayed in a vertical fashion) I used for years something like print "\$variable = '$variable'\n"; and this completely replaced that with much clearer code. I combine this with a trailing if $debug; and life is very good since my code allows turning $debug on and off selectively. If I combine this approach with some of the things mentioned in the post, I can greatly extend my ability to know what the hell is going on with my program :)
pixdamix超过 14 年前
One great tool also is Ack (apt-get install ack-greg) whish is kind of grep on steroids designed to search source files<p>It ignore files in .git/.svn directories, you can define your own file type filters in its config file .ackrc