in reply to Re^3: Using qw to check for balanced parentheses
in thread Using qw to check for balanced parentheses

That won't handle "" hand "0", but that's easy to fix:
sub is_balanced { eval "qw($_[0]); 1" }