Dear friends,
could you please show me the way,how to write the code for converting data from input_file to output files (1001.out,1002.out,1003.out) format.(please see an example attached)
I have already doing with this code writing about four week,but unfortunatlly..,becouse i'm just beginner:-(
I have a text file (input_file.txt). And output i need are files 1001.out;1002.out;1003.out.
Here are steps what programm must do:
1.Open input file
2.reads lines from canal "10"- to canal "A0" (info from line "10" to line "A0" must be one file)
3.convert lines(canal numbers "10","20","30" ... on two first position) as is show in output files. For example:
10
20
20
20
20
30
30
30
4.and save this data to new file(1001.out). P.S. File names coming from lines "10 1001" ,acctually file names is from 3 position for characters,in this case is "1001" or "1002" or "1003"..
I'm not sure what I'm trying to do here..
#!perl -w $count = 0;
while (<STDIN>) { if (substr($_,0,2) eq "10") { #If left 2 ++$count; $lines = 0; open OUT, ">$count.out"; print OUT $_; };
} __EOF__
Any help welcome!
Regards,
VItali
Estonia,Tallinn
|