Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Don't put a conditional into an assignment operator. What would be the return value of =? ? What would "$x = $y =? $z" do ?
    • > What would be the return value of =? ?

      Just what I wrote in original post : ($x =? expr) would mean
      ($tmp = expr and $x = $tmp)

      > What would "$x = $y =? $z" do ?
      $x = ($tmp = $z and $y = $tmp)

      so if $z is false, $y is untouched and $x is false, whereas with

      "$x =? $y =? $z"

      both $x and $y stay untouched if $z is false