TomDLux has asked for the wisdom of the Perl Monks concerning the following question:
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Is it a list or a flip-flop?
by Paladin (Vicar) on Aug 18, 2005 at 19:09 UTC | |
|
Re: Is it a list or a flip-flop?
by Transient (Hermit) on Aug 18, 2005 at 19:10 UTC | |
by GrandFather (Saint) on Aug 18, 2005 at 19:18 UTC | |
by Transient (Hermit) on Aug 18, 2005 at 19:21 UTC | |
|
Re: Is it a list or a flip-flop?
by GrandFather (Saint) on Aug 18, 2005 at 19:10 UTC | |
|
Re: Is it a list or a flip-flop?
by revdiablo (Prior) on Aug 19, 2005 at 17:34 UTC | |
by TimToady (Parson) on Aug 19, 2005 at 18:32 UTC | |
|
Re: Is it a list or a flip-flop?
by QM (Parson) on Aug 18, 2005 at 22:36 UTC |