in reply to I'm trying to get a numeric array
You need to replace:
with:my @chwhs = (<STDIN>);
Same thing for the @cogs. You're reading a line from standard input and you need to tell perl that this line contain several space separated values.my $chwhs = <STDIN>; chomp $chwhs; my @chwhs = split /\s+/, $chwhs;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: I'm trying to get a numeric array
by fatmac (Acolyte) on Sep 03, 2012 at 12:21 UTC | |
by fatmac (Acolyte) on Sep 03, 2012 at 19:07 UTC |
In Section
Seekers of Perl Wisdom