in reply to Re: Completing a list/ array?
in thread Completing a list/ array?
ok sorry i just re-read it and it is very confusing i will give you a better example
This is an example of my Data
Numbers.txt 33 5 34 7 36 7 37 8 38 0 etc
Right now my problem is i have 3 million of these data points and dozens of files. What i am trying to do is make a program so that any numbers missed between 1 and 3000,050 is given the value zero on the right hand side like this
full_numbers.txt 1 0 2 0 3 0 4 0 … 33 5 34 7 36 7 37 8 38 0 … 3000050 0
so all the missing numbers between 1-3000050 are given the value zero
I would like to make the code so that it accepts an input file and the output goes into another file on a tab based spacing format. This is as far as i got
#!/usr/bin/perl $spacer = "\t"; $INPUTFILE = "/Users/ts/desktop/work/numbers.txt"; open(INPUTFILE) or die("File error: input file\n"); open (OUTPUTFILE, "/Users/ts/desktop/work/full_numbers.txt");
OK now i think i need to splice the data since it is in columns then i am unsure.</>
Once again i apologise for any confusion in original question and i hope this clears things help
Thanks in advance
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Completing a list/ array?
by CountZero (Bishop) on Nov 12, 2011 at 15:53 UTC | |
by Taylorswift13 (Novice) on Nov 12, 2011 at 16:41 UTC | |
by CountZero (Bishop) on Nov 12, 2011 at 18:22 UTC | |
|
Re^3: Completing a list/ array?
by aaron_baugher (Curate) on Nov 12, 2011 at 17:18 UTC | |
by Taylorswift13 (Novice) on Nov 12, 2011 at 17:41 UTC | |
by Not_a_Number (Prior) on Nov 12, 2011 at 18:38 UTC | |
by Taylorswift13 (Novice) on Nov 12, 2011 at 19:09 UTC | |
by aaron_baugher (Curate) on Nov 12, 2011 at 18:36 UTC |