#!\usr\bin\perl -w $_="Hello there,neighbour"; if(/(\s+) (\s+), (\s+)/){ print "words are $1 $2 $3\n"; }