Leser: 29
1 2 3 4 5 6 7 8 9 10 11 12
sub checkIsTagValueInclude{ my $tagvalue = shift; my $search = shift; my $result = 0; if (";$tagvalue;" =~ /\;$search\;/i){ $result = 1; }else{ $result = 0; } return ($result); }# end-checkIsTagValueInclude
1 2 3 4
sub checkIsTagValueInclude { my ($tagvalue, $search) = @_; return ";$tagvalue;" =~ m/;$search;/i ? 1 : 0; }
sub checkIsTagValueInclude{ 0 + $_[0] =~ /^$_[1]$/i }
sub checkIsTagValueInclude { 0 + ";$_[0];" =~ /\;$_[1]\;/i }
1 2 3 4
sub search { my ( $str, $search ) = @_; return grep { $_ eq $search } split /;/, $str; }
1 2 3 4
sub search { my ( $str, $search ) = @_; return grep $search, split(/;/, $str); }
1
2
3
4
5
6
7
8
9
sub checkIsTagValueInclude {
my ($tagvalue, $search) = @_;
if (";$tagvalue;" =~ /\;$search\;/i) {
return 1;
}
return 0;
}