in reply to
no grep match returns undefined?
In list context,
grep
will return an empty list if no matching elements were found. What you're doing is trying to access the
0th
first element of an empty list, which results in
undef
.
-- Mike
--
just,my${.02}
Comment on
Re: no grep match returns undefined?
Select
or
Download
Code
In Section
Seekers of Perl Wisdom