sub is_pattern_data_zip_file
{
my ($gzh, $pattern) = @_;
{
my ($gzh, $pattern) = @_;
my $temp;
#read the entire file
{
local $/;
$temp = ;
}
#read the entire file
{
local $/;
$temp = ;
}
return 1 if ($temp =~ /$pattern/) or return 0;
}
}
sub is_pattern_data_zip_file2
{
my ($gzh, $pattern1, $pattern2) = @_;
{
my ($gzh, $pattern1, $pattern2) = @_;
my $temp;
#read the entire file
{
local $/;
$temp = ;
}
#read the entire file
{
local $/;
$temp = ;
}
$_ = $temp;
return 1 if (/$pattern1/ || /$pattern2/) or return 0;
}
return 1 if (/$pattern1/ || /$pattern2/) or return 0;
}
sub is_pattern_data_zip_file3
{
my $gzh = shift;
{
my $gzh = shift;
my $temp;
#read the entire file
{
local $/;
$temp = ;
}
#read the entire file
{
local $/;
$temp = ;
}
foreach(@_) {
if ($temp =~ /$_/) {
return 1;
}
}
return 0;
}
if ($temp =~ /$_/) {
return 1;
}
}
return 0;
}
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/677997/viewspace-664899/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/677997/viewspace-664899/