Perl具体代码
以下程序是用 Perl 编写的。
cat "test... test... test..." | perl -e '$??s:;s:s;;$?::s;;=]=>%-{<-|}<&|`{;;y; -/:-@[-`{-};`-{/" -;;s;;$_;see'
有人可以帮助我理解它是如何工作的吗?
The following program is in Perl.
cat "test... test... test..." | perl -e '$??s:;s:s;;$?::s;;=]=>%-{<-|}<&|`{;;y; -/:-@[-`{-};`-{/" -;;s;;$_;see'
Can somebody help me to understand how it works?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Debian 论坛已经有人询问过这段代码。
根据该线程的主持人 Lacek 的说法,该代码最初的作用是 rm -rf / ,尽管他们提到他们已经更改了那里的版本,以便人们试图弄清楚它是如何工作的不要删除他们的整个文件系统。其中还解释了 Perl 代码各个部分的作用。
(你发布这篇文章时知道它做了什么,还是不知道它的作用?)
引用 Lacek 的帖子:
(我在这里用“反引号”替换了实际的反引号字符,这样代码自动格式化就不会启动。)
This bit of code's already been asked about on the Debian forums.
According to Lacek, the moderator on that thread, what the code originally did is
rm -rf /
, though they mention they've changed the version there so that people trying to figure out how it works don't delete their entire filesystem. There's also an explanation there of what the various parts of the Perl code do.(Did you post this knowing what it did, or were you unaware of it?)
To quote Lacek's post on it:
(I've substituted 'backtick' for the actual backtick character here so that the code auto-formatting doesn't kick in.)