Perl笔记
时间:2005-11-24 来源:ga0feng
所有关于perl的,学习笔记。都放在这了。
不罗嗦了。
Perl, Let's begin.....
不罗嗦了。
Perl, Let's begin.....
1.
#!/bin/perl -w //-w 开启warning
2.
$thing=;
3.
for ($tt=3;$tt>0;$tt--){
print "$tt is $tt ";
}
4.
chomp $mons;
5.
@boy=('hello','hello1','hello2');
@girls=qw( Marcia Jan Cindy );
@kids=(@girls, @boys);
@family=(@kids, ('Mike', 'Carol'), 'Alice');
print "@girls ";
print "$girls[0] ";
print $#girls //print how many girls(num - 1) in @girls
foreach $girl (@girls){
print "$girl ";
}
6.
@words=split(/ /,"The quick brown fox");
相关阅读 更多 +