$ vi p6.pl "p6.pl" 36 lines, 925 characters #!/opt/perl5.16/bin/perl use strict; use warnings; our $paren = qr/ # Need declared variable with use strict. \( ( [^()]+ # Not parens | (??{ $paren }) # Another balanced group (not interpolated yet) )* \) /x; # 'x' means ignore whitespace, comments. my $stuff = "On the outside now then (we go( in( and in (&stop)(awhile) ( furthe r ))) but still (here) ) and now (for a while) we are out again."; $stuff =~ /($paren)[^()]*($paren)/; print "----------\n"; print "$stuff\n"; print "----------\n"; "p6.pl" 27 lines, 650 characters $ ./p6.pl Variable "$paren" is not imported at (re_eval 1) line 2. Global symbol "$paren" requires explicit package name at (re_eval 1) line 2. Compilation failed in regexp at ./p6.pl line 14. $