#!/usr/bin/perl use strict; use warnings; my $s = 'earth, wind & fire'; my @out = split /\b/, $s; print "$_\n" foreach (@out);