in reply to Re: Checking for blank string
in thread Checking for blank string

By initialised, i mean i get a warning saying "Use of uninitialized value $data in string eq at /path with the following code:

next if ('' eq $data)

Replies are listed 'Best First'.
Re^3: Checking for blank string
by hippo (Archbishop) on Sep 26, 2016 at 08:46 UTC

    In that case, your $data really is undefined. I would rewrite your statement like this:

    next unless defined $data;

    TIMTOWTDI, of course.