On 11/30/06, Chris Parker <[EMAIL PROTECTED]> wrote:
while(@numbers = <>)
{
# Extract widths
@width = split(" ", $numbers);
Here at this piece of code, @numbers and $numbers are different
variables. And you never assign anything to $numbers. Probably you
want this:
while (<>) { # read a line
my @numbers = split /\s+/, $_; # split the line (using spaces as
the delimiter)
Hint: Always use at the start of the script,
use strict;
use warnings;
and introduce 'my' variable declarations.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>