Thread smart match (3 answers)
Opened by Gast at 2009-10-23 16:06

Gast Gast
 2009-10-23 16:06
#127273 #127273
Hi,

wie kann ich soetwas mit dem smart-match-Operator schreiben?

Code (perl): (dl )
1
2
3
4
5
6
7
8
9
#!/usr/bin/perl -w
use 5.010;
use strict;

my $string = '12 23 34 45 5464 46';

while ( $string =~ /(\d\d)\s/g ) {
    say $1;
}

View full thread smart match