in reply to split every second word
See. perlre and perlop for more info.my $str = "Bob Builder Tinky Winky Bugs Bunny Mickey Mouse"; my @names = $str =~ /(\w+ \w+)/g; print "[$_]\n" for @names; __output__ [Bob Builder] [Tinky Winky] [Bugs Bunny] [Mickey Mouse]
_________
broquaint
|
|---|