> > Not a regex master here, but how about m/^$/
> >
> > ^ for the start of string, $ for end.
> >
>
> That might work. Shortly after writing the e-mail, I remembered that
> undef, or NULL, evaluates to false. So,
>
> if( !$String )
>
> would evaluate to TRUE if $String is empty (or NULL, or however you want
> to say it).
>
Yeah....just peppr a couple ?s in your regex
if $_ =~ ((\S+\s+)?(\D+\d)(what!))
{
if ($1 && $2)
//do stuff
}
and if that segment evaluates to nothing you're set.
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list