in reply to Re^4: Completing a list/ array?
in thread Completing a list/ array?
OK, now that's fixed, try this:
use Modern::Perl; use autodie; my $infile = '/Users/ts/desktop/work/numbers.txt'; # Hmm... my $outfile = 'Users/ts/full_number.txt'; # leading '/' or n +ot? open my $in, '<', $infile; my @result; while ( <$in> ) { my ( $index, $value ) = split; $result[$index] = $value; } close $in; open my $out, '>', $outfile; say $out "$_\t", $result[$_] || 0 for 1 .. 3_000_050; close $out;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Completing a list/ array?
by Taylorswift13 (Novice) on Nov 12, 2011 at 19:09 UTC |