摘要:
1 #!/usr/bin/perl 2 3 use strict; 4 use warnings; 5 6 $_ = 'duwanxkm,c.,df;oq123@#!@%$#^'; 7 my $d ='d';my $o = 'o';my $where =index($_,$o);print "$where\n"; 8 $where =index($_,$d,7);print ... 阅读全文
摘要:
1 #!/usr/bin/perl 2 3 use strict; 4 use warnings; 5 6 foreach my $arg(@ARGV) 7 { 8 print "one is $arg\n"; 9 } 10 11 # perl t.pl *.txt 12 # one is 1.txt 13 # one is 2.txt 14 15 my @al... 阅读全文
摘要:
TTY:终端是一种字符型设备,它有多种类型,通常使用tty 来简称各种类型的终端设备 阅读全文
摘要:
1 #!/usr/bin/perl 2 3 use strict; 4 use warnings; 5 6 $_ = 'oireqo````'; 7 8 unless($_ =~ /^a/m){print "no match to a\n"} 9 10 #no match to a 11 12 if(!($_ =~ /^a/m)){print ... 阅读全文