Count the double-quotes?
say $in =~ (/"/g % 2) ? 'invalid' : 'valid';
Update: slower fingers than choroba but nice to know others thought of the same simple approach.
In reply to Re: validating a quoted string
by hippo
in thread validating a quoted string
by hellosarathy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |