First, read Markup FAQ to help you format your posts. Of course "Help" as a title is not "helpful" to us.
You don't say what if any programming experience that you have although your post alludes to the idea that you have some other way than Perl to solve this problem.
In general, I would recommend a 3 stage approach:
The most simple version of program 2 is similar, except that since it is a CSV (Comma Separated Value) file, you need a different kind of split.#!/usr/bin/perl use warnings; use strict; open FILE1, '<', "file1name" or die "input1 error $!"; while (my $line = <FILE1>) { chomp $line; #remove line endings my ($name1,$name2,$name3,$name4,$name5) = split ' ',$line; #use some names that describe what you columns really #mean usually col1, col2 is a bad idea. # put some print statements here to make sure that # you can actually get the 5 individual things }
This simple approach won't work if there are embedded commas in the text, like: "Bob Smith, Jr.". I don't want to over complicate things if these more complex things are not needed. Program 2 will help you figure out whether this is an issue or not.my ($nameOfNumberfield1, $nameOfNumberfield1, $nameofTextField, $nameofTextfield) =split ',',$line;
Make a stab at the combined program 3 and let us know what issues you are having. If line 5 of input 1 always goes with line 5 of input 2, then this is much easier than a more general situation, but I can't tell from your description what the full requirements are.
I hope that my advice on some of the basics: (a) open the file, (b)basic parsing can get you started? Read about file open and split. Good Luck on your journey, it will require a lot of work.
In reply to Re: Please Help!
by Marshall
in thread Please Help!
by stockbr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |