in reply to I've never seen this syntax before

It returns the inverse of whatever Execute($cmd) returns. If Execute($cmd) returns true, the sub returns false and vice versa.

[ar0n]

Replies are listed 'Best First'.
So what does 'inverse' mean?
by PsionicMan (Beadle) on Apr 05, 2001 at 00:01 UTC
    What exactly does `inverse' mean in perl? Is it only in terms of 0 and everything else? Or is there some mathematical inversion that could be harnessed? Like reciprocals etc. I'm hoping it's the latter, but I suspect it's the former...

    --Psi
    print(pack("h*","e4f64702566756e60236c6f637560247f602265696e676021602075627c602861636b65627e2")."\n");

      If the operand is 0, a string beginning with "0", a null string, or undef the result is 1, otherwise the result is a null string.
        It says in Merlyn, et al's Learning Perl that both '00' and '0.00' evaluate to a boolean value of 1. It doesn't matter whether a string begins with 0.
Re: (ar0n) Re: I've never seen this syntax before
by ChuckularOne (Prior) on Apr 04, 2001 at 23:22 UTC
    Thanks, that was what I thought, but there is no return in the Execute() sub, so it looks like it's useless code.

    Your Humble Servant,
    -Chuck
      No necessarily useless... the last line of a subroutine becomes its return value if none is specified explicitly... so: <CODE> sub foo { 1; } #and sub foo2 { return 1; } both return 1
                      - Ant
      In Perl, the value of last evaluated statement is returned in a subroutine - the return token is optional, but you shouldn't abuse this (too much).

      Jeff

      R-R-R--R-R-R--R-R-R--R-R-R--R-R-R--
      L-L--L-L--L-L--L-L--L-L--L-L--L-L--
      
        In Perl, the value of last evaluated statement is returned in a subroutine
        expression, not statement. You can't evaluate a statement.

        -- Randal L. Schwartz, Perl hacker