Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: a75919c2c4
Fetching contributors…

Cannot retrieve contributors at this time

file 11 lines (8 sloc) 0.218 kb
1 2 3 4 5 6 7 8 9 10 11
use strict;
use 5.10.0;

my @in = ('foo 1', 'bar 2');
my @out = map { /(\S+)/ } @in;

# Cleaner than these, ya?
# map { ($_) = split/\s+/, }
# map { (split/\s+/)[0] }

say "[" . (join "|", @out) . "]";
Something went wrong with that request. Please try again.