Thread Regexp: Ersetzungsausdruck mitbenutzen (25 answers)
Opened by #Kein Kommentar at 2008-07-12 21:22

Gast Gast
 2008-07-14 01:03
#112068 #112068
Man kann das auch mit Prototypen machen :)
Code: (dl )
sub episode ($$$)

Dann wird skalarer Kontext erzwungen.

Und es geht sogar strict und warnings konform und ohne den 3. Parameter:
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
sub episode ($$)
{
my( $start, $end ) = @_;

my $flipflop if 0;
($flipflop = 0) unless $flipflop;

($flipflop = 1) if $start;
my $return = $flipflop;
($flipflop = 0) if $end;

return $return;
} # episode

MfG

View full thread Regexp: Ersetzungsausdruck mitbenutzen