in reply to Help with range operator

if (1 .. $not_default =~ /^$/) { do this ; }

Replies are listed 'Best First'.
Re^2: Help with range operator
by blazar (Canon) on May 16, 2006 at 09:56 UTC

    OTOH I think he really wants

    if (1 .. $not_default eq '') { do this ; }

    or even

    if (1 .. !$not_default) { do this ; }

      Well, it's either
      if (1 .. $not_default eq '')
      or
      if (1 .. $not_default eq "\n")
      depending on whether he chomps or not (if $_ is coming from a file as I suspect).

A reply falls below the community's threshold of quality. You may see it by logging in.