>>>>> "hooyar66" == hooyar66 < pcbcad%40hotpop.com">pcbcad
hotpop.com> writes:
This is dangerous:
hooyar66> $line =~ /"(.+)"/;
because if it *doesn't* match, then:
hooyar66> my $str = $1;
the $1 there is the *previous* $1. Bad. Very bad idea.
NEVER use $1 except in a context where you have validated that the
match has actually succeeded.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
< merlyn%40stonehenge.com">merlyn
stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
.