5 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
sub _get_filter {
my $self = shift;
my @ret;
if ($self->{autoDeleteHeader}) {
push @ret, sub {
my $tmpl = shift;
my $header;
###if ($$tmpl =~s{^.+?<body([^>'"]*|".*?"|'.*?')+>}{}msi) {
if ($$tmpl =~s{(^.+?<body(?:[^>'"]*|".*?"|'.*?')+>)}{}msi) {
###$self->{header} = $&;
$self->{header} = $1;
&tokenizer_header($self);
} else {
# header doesn't exist
undef $self->{header};
undef $self->{tokens};
}
$$tmpl =~ s{</body>.+}{}msi;
};
}
return \@ret;
}
QuoteWie funktioniert dieses push @ret, sub {} ?
1
2
3
4
5
6
7
tina@lux:~> perl -wle'
my $sub = sub {
print "arguments: (@_)";
};
$sub->(1, 2, 3);
'
arguments: (1 2 3)
5 Einträge, 1 Seite |