摘要: 散列的索引值,不是数值,而是 互不相同的任意字符串。 任意的 字符串 ,一个散列里只能有一个名叫Willa的元素 2. 如何命名 散列变量的 名称 $family_name(“宏”) = “李”; 这样可以 说 “宏” 的姓 是 “李” 阅读全文
posted @ 2019-06-11 16:33 books2read 阅读(317) 评论(0) 推荐(0)
摘要: #! /usr/bin/perl use strict;use warnings;=head1print "\n test_ \n";if(!open LOG, ">> Z/logfile"){ die "can't create logfile: $!";}print "\n test_ \n"; 阅读全文
posted @ 2019-06-11 15:53 books2read 阅读(276) 评论(0) 推荐(0)
摘要: #! /usr/bin/perl use strict;use warnings;print "\n <STDIN>_store_into_an_array_and_then_chomp() \n";my @lines = <STDIN>;chomp(@lines);print "\n Input_ 阅读全文
posted @ 2019-06-11 15:52 books2read 阅读(161) 评论(0) 推荐(0)
摘要: #! /usr/bin/perluse strict;use warnings;print "\n summation_STDIN_parameter \n";sub total{ my $array_len = @_; my $sum = 0; foreach(0..$array_len){ $s 阅读全文
posted @ 2019-06-11 15:51 books2read 阅读(257) 评论(0) 推荐(0)
摘要: #! /usr/bin/perl use strict;use warnings;=head1print "\n ch_5_Q1_ \n";#print reverse <>;print "\n _ \n";select STDIN;my @single_quotation = <>;print @ 阅读全文
posted @ 2019-06-11 15:51 books2read 阅读(158) 评论(0) 推荐(0)
摘要: #! /usr/bin/perl use strict;use warnings;=podprint "\n while(defined(\$equal_sign = <>)) \n";my $forwar_slash;while(defined($forwar_slash = <>)){ chom 阅读全文
posted @ 2019-06-11 15:50 books2read 阅读(251) 评论(0) 推荐(0)
摘要: 花括号的使用 printf %${width}s , 否则会 去找 $widths 1 #! /usr/bin/perl 2 use strict; 3 use warnings; 4 5 =head1 6 print "\n ch_5_Q1_ \n"; 7 #print reverse <>; 8 阅读全文
posted @ 2019-06-11 15:30 books2read 阅读(355) 评论(0) 推荐(0)
摘要: reverse 是倒置 <> 则是 把 @ARGV 参数列表里面的文件都读取出来 ? print <> 就是和 cat 的功能一样了。 脚本语言交流、数据处理 QQ群:6680-19199,欢迎加入,加入时注明 “cnblogs" 或 “script” 或 “脚本” 或 "perl”,谢谢! 阅读全文
posted @ 2019-06-11 13:23 books2read 阅读(541) 评论(0) 推荐(0)
Total Visits
AmazingCounters.com