Perl中Data::Dumper处理后的Array少了一项?

orangetouch 2003-08-24 02:35:55
代码如下:
#!/usr/bin/perl
use Data::Dumper;
$, = ',';
my @d1 = (1, 3);
my @d2 = (2, 4);
push @d1, \@d2;
push @d2, \@d1;
my $d = Dumper(\@d1, \@d2);
print $d;
eval $d;
print "@{$VAR1}\n@{$VAR2}";

输出结果:
$VAR1 = [
1,
3,
[
2,
4,
$VAR1
]
];
$VAR2 = $VAR1->[2];
1 3 ARRAY(0x2b25500)
2 4

第二项的输出结果为什么少了最后的一项引用?哪位大侠见过类似的问题请说明一下。谢谢。
...全文
52 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
klbt 2003-09-27
  • 打赏
  • 举报
回复
关注,帮你顶。
gvim常用插件及其配置文件 支持c,perl,python,latex。 需要自己安装ctags .vim: after compiler doc indent ltags perl-support skeleton syntax autoload c-support ftdetect keymap Makefile plugin snipMate.vim.ct tools colors CVIMSYN ftplugin latextags Makefile.in README.csupport snippets .vim/after: ftplugin plugin syntax .vim/after/ftplugin: c_snippets.vim java_snippets.vim python_pydiction.vim python_snippets.vim sh_snippets.vim .vim/after/plugin: .vim/after/syntax: cpp.vim c.vim java.vim .vim/autoload: acp.vim perlsupportgui.vim perlsupportprofiling.vim perlsupportregex.vim snipMate.vim .vim/colors: desertEx.vim peachpuff.vim zenburn.vim .vim/compiler: tex.vim .vim/c-support: codesnippets doc rc scripts templates wordlists .vim/c-support/codesnippets: calloc_double_matrix.c main.cc print_array.cc.noindent calloc_int_matrix.c Makefile print_double_array.c.noindent main.c Makefile.multi-target.template print_int_array.c.noindent .vim/c-support/doc: ChangeLog c-hotkeys.pdf c-hotkeys.tex .vim/c-support/rc: customization.ctags customization.gvimrc customization.indent.pro customization.vimrc .vim/c-support/scripts: wrapper.sh .vim/c-support/templates: c.comments.template cpp.comments.template cpp.preprocessor.template c.statements.template c.cpp.template cpp.cpp.template cpp.statements.template Templates c.idioms.template cpp.idioms.template c.preprocessor.template Templates~ .vim/c-support/wordlists: c-c++-keywords.list c-c++-keywords.list.bak k+r.list stl_index.list .vim/CVIMSYN: engspchk.contraction engspchk.dialect engspchk.dict engspchk.match engspchk.proper engspchk.rare .vim/doc: acp.jax latexhelp.txt latex-suite-quickstart.css Makefile taglist.txt acp.txt latex-suite latex-suite-quickstart.html Makefile.in tags catalog.xml la

37,719

社区成员

发帖
与我相关
我的任务
社区描述
JavaScript,VBScript,AngleScript,ActionScript,Shell,Perl,Ruby,Lua,Tcl,Scala,MaxScript 等脚本语言交流。
社区管理员
  • 脚本语言(Perl/Python)社区
  • IT.BOB
加入社区
  • 近7日
  • 近30日
  • 至今

试试用AI创作助手写篇文章吧