My team at work has started going over Damian's Perl Best Practices book, one item a day; we're starting with the Ten Esential Coding Practices summaries from Appendix A.
As a result, we're starting at the end of the book, pages 430-432: 'use strict', 'use warnings'.
We had a fun time going over the bit of code on page 430, trying to detect all the errors, and then reading the error messages, making sure we understood them all.
There's one I don't understand:
my $n = 9; my $list = (1..$n);
which reports an 'uninitialized value in range or flip'.
Please enlighten me, my brethren ... my forehead is flattening from pounding on the wall.
Update: I had identified the errror of attempting to assign a list to a scalar. Paladin wins the chocolate cigar, as proved by:
use strict; use warnings; my $n = 9; $. = 1 my $list = (1..$n); print "'$list'\n";
--
TTTATCGGTCGTTATATAGATGTTTGCA
In reply to Is it a list or a flip-flop? by TomDLux
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |