my @data = <SRC>
chomp @data
close SRC
open SRC, "file1.txt" or die "$! file1"# 第 1 组
while ( my $line = <SRC>) {
print $line.$/ if grep { $line =~ /[^\d]$_[^\d]/ } @data
}
close SRC
集成进来的话,大概是这样例子:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <EXTERN.h> /* from the Perl distribution */
#include <perl.h>/* from the Perl distribution */
static PerlInterpreter *my_perl /***The Perl interpreter***/
int main(int argc, char **argv, char **env)
{
PERL_SYS_INIT3(&argc,&argv,&env)
my_perl = perl_alloc()
perl_construct(my_perl)
PL_exit_flags |= PERL_EXIT_DESTRUCT_END
perl_parse(my_perl, NULL, argc, argv, (char **)NULL)
perl_run(my_perl)
perl_destruct(my_perl)
perl_free(my_perl)
PERL_SYS_TERM()
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)