in reply to Re^4: Use of uninitialized value in addition
in thread Use of uninitialized value in addition
Well this code is nicely indented and has huge clues as to what is important or not.
The above sort of statement is the single exception that I use the comma operator. I agree that indenting and spacing is one of the most important things that can be done when writing code.while ( (print "Enter Number: "), (my $line=<STDIN>) !~ /^\s*d(?:one)?\s*$/i ) {....}
In the above, maybe the reader or maintainer couldn't write this in the first place, but he/she will get the "gist" of the idea of what this while loop does.
Yes, the comma operator is rare. This is the only situation that I know of where it it justified. But "rare" does not mean "never".
I think my regex is fine. D,d,DOne,donE, etc match.
|
|---|