Your skill will accomplish what the force of many cannot |
|
PerlMonks |
no grep match returns undefined?by c (Hermit) |
on Sep 05, 2002 at 16:09 UTC ( [id://195423]=perlquestion: print w/replies, xml ) | Need Help?? |
c has asked for the wisdom of the Perl Monks concerning the following question:
I read through grep, but the doc doesnt seem to indicate whether or not a situation where grep matches nothing results as undef or an emptry string. My code:
I'm getting an error Use of uninitialized value in string ne when the grep finds nothing. Would a if (!$vndr_key) be a better fit? And if so, I'd still like to understand just what grep is returning. Thanks -c
Back to
Seekers of Perl Wisdom
|
|