in reply to Assigning values. Simple and Nasty one.
If you know the delimiter between the two columns and its fixed, you can use the "split" method in perl to extract the column values as follows:
@arr = split(/delimiter/,$_);
Now the array "arr" contains all column values in 1 line of the file. Then you can print $arr[0] and $arr[1].
More can be elaborated on this if you specify the exact format of the file.
Please go through perl documentation of split. That will make things far more clear.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Assigning values. Simple and Nasty one.
by Anonymous Monk on Apr 19, 2005 at 10:50 UTC | |
by pearlie (Sexton) on Apr 19, 2005 at 10:52 UTC | |
|
In Section
Seekers of Perl Wisdom