P is for Practical | |
PerlMonks |
Re^2: matching a line with ' and "by ww (Archbishop) |
on Jul 18, 2008 at 11:36 UTC ( [id://698576]=note: print w/replies, xml ) | Need Help?? |
Note that when the string includes mixed quoting which is not valid in the OP's terms: my $string = qq{var1='1' var2="2" var3="3" var4='4" var5="5' var6="correct"};...hipowls non-5.10 version (5.10 not tested) produces "ugly" output in the sense used by almut and skeeve
More significantly, if $str is in the form: my $string = qq{var1='1' var2="2" var3="3" var4='4" var5="5'...the output becomes:
...which is the same as the output produced if var5 is properly quoted, var5='5': my $string = qq{var1='1' var2="2" var3="3" var4='4" var5='5'};i.e.,
That sort of ambiguity may be a problem for OP.
In Section
Seekers of Perl Wisdom
|
|