>>> 此貼的回復 >> [root@supersun ~/programe/perl 14:10:24]$ cat num.pl #!/usr/bin/perl -w use strict;
my $pattern=shift; my $file=shift; open FD,$file; while(my $content=) { my @number=split "$pattern",$content; print "$#number\t $content"; }
close FD;
[root@supersun ~/programe/perl 14:10:27]$ ./num.pl www hhh 2 www.333.com www.bbb.com 222.ccc.com [root@supersun ~/programe/perl 14:10:31]$