- 博客(6)
- 收藏
- 关注
原创 textmate 快捷技巧
textmate 快捷技巧文章分类:综合技术高手都是可以不用鼠标的,恩,向高手学习.textmate 的快捷键忒多了: 自动补全 : esc查找项目文件:command+t查找文件内符号:shift+command+t跳到某行:command+l选择:shift+方向键向后缩进:option+tab向前缩进:shift+option+tabreformat 所选:option+command+[大写所选:control+u小写所选:
2010-06-15 18:12:00
945
原创 hash 使用
<br /> <br />use Data::Dumper;<br /> <br />#my %fruit_color = ("apple", "red", "banana", "yellow");<br /> <br />my %fruit_color = (<br />apple => red, #note : 带不带“”都无所谓<br />banana => yellow,<br />);<br /> <br />print Dumper(%fruit_color);
2010-06-14 19:16:00
614
原创 用grep查询数组
<br />#!/usr/bin/perl@array = ("str1" , "str2" ) ;$item = "str3" ;if ( grep { $_ eq $item } @array) { print "Have /n" ;} else { push @array , $item ; print "Not have /n" ;}print "@array"."/n" ;
2010-06-14 19:16:00
1216
原创 hash
<br /><br />use Data::Dumper;<br /> <br />#my %fruit_color = ("apple", "red", "banana", "yellow");<br /> <br />my %fruit_color = (<br />apple => red, #note : 带不带“”都无所谓<br />banana => yellow,<br />);<br /> <br />print Dumper(%fruit_color);
2010-06-14 19:15:00
241
原创 perl 函数数组
<br /># file args.pl<br /><br />sub my_args<br />{<br /> my $i;<br /> print "My arguments:/n";<br /> for($i=0;$i<=$#_;$i++){<br /> print "Argument $i: $_[$i]/n";<br /> }<br /> print "/n";<br />}<br /><br />my
2010-06-14 17:44:00
441
翻译 举例学perl笔记: 数组
定义: my@animals = ("camel","llama","owl");数组最后一个元素位置(从0开始编号): $#array数组大小: $#array+1 @arrayarray slice :@animals[0,1];# gives ("camel", "llama");@animals[0..2];# gives ("camel", "llama", "owl");@animals[1..$#animals];# gives all except t
2010-06-14 17:27:00
492
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅