gpt4 book ai didi

perl - perl -d 中的 x 和 p 有什么区别?

转载 作者:行者123 更新时间:2023-12-02 08:53:33 25 4
gpt4 key购买 nike

  x|m expr       Evals expr in list context, dumps the result or lists methods.
p expr Print expression (uses script's current package).

它们对我来说看起来很相似,有什么不同?

另外,shell环境中是否有像上/下箭头键这样的快捷键?

最佳答案

参见perldoc perldebug :

p expr Same as "print {$DB::OUT} expr" in the current package. In particular, because this is just Perl's own "print" function, this means that nested data structures and objects are not dumped, unlike with the "x" command.

Readline Support / History in the debugger As shipped, the only command-line history supplied is a simplistic one that checks for leading exclamation points. However, if you install the Term::ReadKey and Term::ReadLine modules from CPAN (such as Term::ReadLine::Gnu, Term::ReadLine::Perl, ...) you will have full editing capabilities much like GNU readline(3) provides. Look for these in the modules/by-module/Term directory on CPAN.

关于perl - perl -d 中的 x 和 p 有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6675005/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com