Bart Lateur wrote: > > On Sun, 9 Mar 2003 21:21:47 -0500, Ronald J Kimball wrote: > > >I would suggest writing lines 92 and 93 like this: > > > >m/name\s*=\s*"?(\w+)"?/ and $name = $1; > > ... or > > ($name) = m/name\s*=\s*"?(\w+)"?/; > > which will set $name to $1 in case of a successful match, and to undef > otherwise. > It's also useful to remember that this works for array building too:
my (@list) = m/(your string here)/g; so that you can then test for if (@list) ... -Richard