Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有人可以解释一下为什么这不能按我的预期工作吗?
zen:~ emx$ echo ABC | perl -nle "print unpack 'H*'" 414243 zen:~ emx$ echo 414243 | perl -nle "print pack 'H*'" zen:~ emx$
不知何故,我期待第二个命令打印 ABC
unpack()$_如果您不提供第二个参数,则默认使用;pack()另一方面,没有。
unpack()
$_
pack()