use strict; my @patterns; my $pattern = qr{^(\w+):\w+}; do{ push @patterns, $1 while /$pattern/g }while<DATA>; print "@patterns"; __DATA__ user_one:unused user_two:unused user_three:unused __END__ STDOUT: user_one user_two user_three
In reply to Re: Pattern Matching
by sh1tn
in thread Pattern Matching
by webchalkboard
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |