in reply to Re: Parse TCL list?
in thread Parse TCL list?

In regular expressions, the | symbol means "or".
#! /usr/bin/perl use strict; use Regexp::Common; my $string = "@ARGV"; print "$_\n" for $string =~ /(\w+|$RE{balanced}{-parens=>'{}'})/g;
That seems to produce correct output for all of your examples.