programming-examples/perl/SystemFunction/Map function with regular expression.pl

3 lines
62 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
@a = qw(This is a test);
@b = map/^(\w{4})/, @a;
print "@b";