#! /usr/bin/perl my $string = "enum('one','two','three','four') "; my @values = $string =~ /'([^']+)'/g; print $_,"\n" for(@values);