in reply to What about if (my $var = foo()) { ... }

Those are different constructs. As has been discussed before, postfix notation only looks like the same as the normal versions. There are scoping and other differences between normal and postfix if, normal and postfix while, and normal and postfix for.

My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
  • Comment on Re: What about if (my $var = foo()) { ... }

Replies are listed 'Best First'.
Re^2: What about if (my $var = foo()) { ... }
by Limbic~Region (Chancellor) on Dec 29, 2007 at 15:59 UTC
    dragonchild,
    Yes, I know they are different constructs (I said as much). Was giving background information into why I was asking the question confusing? If so, I am only interested in the construct in the thread title and the questions I asked about it. I know I must sound like a broken record by now, I have a newborn and a 2 year old at home and I haven't had much sleep lately.

    Cheers - L~R