##
$string =~ /([-\w']+)/g
####
$string =~ /(\w+[-']?\w+)/g
####
$string =~ /(\w+[-']?\w+|\w)/g
####
#!/usr/local/bin/perl
use strict;
use warnings;
$/ = undef;
my $string = ;
while ($string =~ /(\w+[-']?\w+|\w)/g) {
print "Word: <$1>\n";
}
__DATA__
This is a sentence with words that're different from other words.
They have apostrophes in them (') and dashes, or dash-like characters
(-).