Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I'm very puzzled. I am simply reading files of numbers, seperating them into arrays and testing the numbers in the arrays to see if they're numeric.
My print statement shows neither array have any numerbers in them!
Data is a bit like this:while (<INPUT>) { my $line = $_; my @file; push @file, $_; # the numbers are floating point if ($line =~ /^(\d+\s+)(\d+\W?\s+)(\d+\W?\s+)/) { push @nums, $2 if $2 =~ /\d+/; push @nums2, $3 if $3 =~ /\d+/; } } my ($i, $j); print "$i\t $j\n";
0.2360 0.3789 0.1879 0.3924 0.234 0.172 0.505 0 +.2605 0.3992 0.1560 0.4158 0.284 0.142 0.502 0.2662 0.3377 + 0.2025 0.4286 0.214 0.081 0.452
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Why are my numbers not numeric???
by Abigail-II (Bishop) on Oct 09, 2003 at 16:12 UTC | |
by Anonymous Monk on Oct 09, 2003 at 16:17 UTC | |
by Abigail-II (Bishop) on Oct 09, 2003 at 16:26 UTC | |
|
Re: Why are my numbers not numeric???
by thens (Scribe) on Oct 09, 2003 at 16:16 UTC | |
|
Re: Why are my numbers not numeric???
by bbfu (Curate) on Oct 09, 2003 at 21:51 UTC |