J
Justin C
I've just found something in code I wrote, but I don't
understand it and don't know where I found it. I wrote it a long
time ago. I have this line:
($discard = 0, next) if /^Relayed messages/;
I was tweaking the program for a issue I had (that turns out to
have been elsewhere), and changed the above to:
$discard = 0 if /^Relayed messages/;
At a later stage I had to revert to the original behaviour and
put this:
($discard = 0 && next) if /^Relayed messages/;
Which didn't do what I wanted!
Where can I read about this behaviour of the comma? And what is
that && doing in the last version, am I really saying ($discard
= 0) and ($discard = next)?
Justin.
understand it and don't know where I found it. I wrote it a long
time ago. I have this line:
($discard = 0, next) if /^Relayed messages/;
I was tweaking the program for a issue I had (that turns out to
have been elsewhere), and changed the above to:
$discard = 0 if /^Relayed messages/;
At a later stage I had to revert to the original behaviour and
put this:
($discard = 0 && next) if /^Relayed messages/;
Which didn't do what I wanted!
Where can I read about this behaviour of the comma? And what is
that && doing in the last version, am I really saying ($discard
= 0) and ($discard = next)?
Justin.