in reply to printing the subscript separator

Perhaps you mean $operator !~ /^\s*$/? (which is zero or more characters of just whitespace) You don't really want a character class there. Read perldoc perlretut and perldoc perlre.

Replies are listed 'Best First'.
Re^2: printing the subscript separator
by jacques (Priest) on Feb 09, 2005 at 18:22 UTC
    Perhaps you mean $operator !~ /^\s*$/?

    Nope. That if statement is suppose to filter values that are space characters (not zero or more space char).

      Perhaps you could be more descriptive :)

      Update: That's zero or more space characters from start to end... in other words... either nothing (no chars) or all whitespace.

      my $var = '';
      That will not be caught by /^\s+$/
        But it would be caught by the if statement since it checks if $operator is not defined.

        Update: I was thinking of 'false'.