关于perl的问题 100:00:09,855 --> 00:00:14,724Britain was an objec
来源:学生作业帮 编辑:大师作文网作业帮 分类:综合作业 时间:2024/09/29 03:21:04
关于perl的问题
1
00:00:09,855 --> 00:00:14,724
Britain was an object of desire.
2
00:00:26,295 --> 00:00:31,847
Tacitus declared it worth the conquest,
3
00:00:32,015 --> 00:00:35,803
the best compliment
that could occur to a Roman.
如果以句号为分割,把对应的时间合并起来,最后得到下面的结果:
1
00:00:09,855 --> 00:00:14,724
Britain was an object of desire.
2
00:00:26,295 --> 00:00:35,803
Tacitus declared it worth the conquest,
the best compliment
that could occur to a Roman.
perl菜鸟,望指教
1
00:00:09,855 --> 00:00:14,724
Britain was an object of desire.
2
00:00:26,295 --> 00:00:31,847
Tacitus declared it worth the conquest,
3
00:00:32,015 --> 00:00:35,803
the best compliment
that could occur to a Roman.
如果以句号为分割,把对应的时间合并起来,最后得到下面的结果:
1
00:00:09,855 --> 00:00:14,724
Britain was an object of desire.
2
00:00:26,295 --> 00:00:35,803
Tacitus declared it worth the conquest,
the best compliment
that could occur to a Roman.
perl菜鸟,望指教
#!/usr/bin/perl
#f3.pl
my $file;
while (){s/^\s+$//;$file.=$_};
my @data=split/\./,$file;
pop @data;
for (@data){
/^(\d\d:.*?) -->(?:.*)* (\d\d.*?\d)$/sm;
my ($t1,$t2)=($1,$2);
s/^\d+(:.*)?$//gm;
s/$/./;
s/\n+/\n/g;
print ++$num,"\n","$t1 --> $t2",$_,"\n";
}
1
00:00:09,855 --> 00:00:14,724
Britain was an object of desire.
2
00:00:26,295 --> 00:00:35,803
Tacitus declared it worth the conquest,
the best compliment
that could occur to a Roman.
正则表达式是 Perl 语言的一大特色,也是 Perl 程序中的一点难点,不过如果能够很好的掌握他,就可以轻易地用正则表达式来完成字符串处理的任务,当然在设计中就更能得心应手了.
perl菜鸟,请指教
#f3.pl
my $file;
while (){s/^\s+$//;$file.=$_};
my @data=split/\./,$file;
pop @data;
for (@data){
/^(\d\d:.*?) -->(?:.*)* (\d\d.*?\d)$/sm;
my ($t1,$t2)=($1,$2);
s/^\d+(:.*)?$//gm;
s/$/./;
s/\n+/\n/g;
print ++$num,"\n","$t1 --> $t2",$_,"\n";
}
1
00:00:09,855 --> 00:00:14,724
Britain was an object of desire.
2
00:00:26,295 --> 00:00:35,803
Tacitus declared it worth the conquest,
the best compliment
that could occur to a Roman.
正则表达式是 Perl 语言的一大特色,也是 Perl 程序中的一点难点,不过如果能够很好的掌握他,就可以轻易地用正则表达式来完成字符串处理的任务,当然在设计中就更能得心应手了.
perl菜鸟,请指教
关于perl的问题 100:00:09,855 --> 00:00:14,724Britain was an objec
100:00:09,855 --> 00:00:14,724Britain was an object of desir
关于perl的问题现有a文件100:00:16,000 --> 00:00:19,000When I was 10 ye
语法:change of word order 关于古英文与现在的英文语句的问题,order:subject-objec
perl 正则表达式问题
Shell或者perl进行随机分组的问题
编写一段关于blast提取序列的Perl语言
perl中reverse用法问题
perl $@
看到你的百度知道,有个问题希望能帮我一把,写一段perl.
请教一个perl基础问题,for $ranking (reverse sort keys %node),这句的含义是什么
大家谁知道怎样用perl解决生物问题