检查变量值的方法
来源:互联网 发布:java 线程池面试题 编辑:程序博客网 时间:2024/04/28 10:47
调试 Perl 程序时使用最频繁的就是 print 语句了,不过它只能输出普通变量的内容,而不能输出数组和哈希。使用 Data::Dumper 模块则可以输出数组和哈希等复杂变量。
#!/usr/bin/perluse Data::Dumper;my $hashref = { name=>'charlee', age=>25, gender=>'male', interest=>[ 'computer', 'movie', 'cooking' ] };print Data::Dumper::Dumper($hashref);
注意Dumper函数的参数为引用。输出结果为:
$VAR1 = { 'name' => 'charlee', 'interest' => [ 'computer', 'movie', 'cooking' ], 'age' => 25, 'gender' => 'male' };
- 检查变量值的方法
- 交换变量值的方法
- 变量值的交换方法总结
- 变量值的交换方法总结
- 变量值的交换方法总结
- 3种交换变量值的方法
- 获取绑定变量值的方法
- 两种交换变量值的方法
- 交换两个变量值的方法
- 交换变量值的三种方法
- 两个变量值的交换方法
- 交换两个变量值的方法
- shell判断变量值的方法
- 交换两个变量值的常用方法
- 变量值的变换
- unix取一个变量值的长度方法
- asp.net页面间变量值传递的方法
- asp.net页面间变量值传递的方法
- 交流
- 总觉得在Perl里面读取文本文件应该用个循环:
- 最新版本下载(2008-8-20)
- 安装Perl模块
- 设置FreeBSD的终端色彩和设置开机Splash
- 检查变量值的方法
- A Killer Collection of Global CSS Reset Styles
- 转变正慢慢逼近
- 木马百科知识总结[概念,种类,基本防范]
- 因为我不是神仙,所以不能无所不知;
- Perl小技巧:文件操作
- 使用 perldoc 找文档
- ExtJs入门
- Program