Miette wrote: > > I'd like to use something like this > > @lines = grep(/^"(.*)",?$/, @fulltext); > > except I want @lines to contain what would be in > $1...that is the (.*) part instead of the whole line. > > I was doing this > > for (@fulltext) { > if (/^"(.*)",?$/) { > push (@lines,$1); > } > } > > but it seems like the grep might be more efficient.
map will do what you want: @lines = map( /^"(.*)",?$/, @fulltext ); John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]