I have the following data in a file:
ABC corp. 1 1002003 1002007 some text here 2 1011999 1012020 other text here XYZ Ltd. 1 2031994 2032071 some text here 2 2021996 2022030 other text here 1 1871995 1872031 some text here 2 1772004 1772021 other text here ...
and I need to match individual records in another file that start with a give id+year (e.g. 2032002) to its corresponding range per the data show above.
I have thought to load the data above into a record and then use that record to identify matches as I parse through the other data file. As matches are found I write the results to a results page that includes counts, company name, and the data (or some unique id that can be used to refer to the data).
I am fairly new to Perl and am finding it complicated to extract data out of my record... (which would look something like below):
@corps = ( { name => "ABC Corp.", ranges => [ { bid = "1022002", eid = "1022002", prefix = "102" }, { ... } ] }, { name => "XYZ Ltd.", ranges => [ { ... } ] } );
Reading the data file (sample in the top of email) and dynamically creating this record seems somewhat tricky but I was able to do it (I think). What I am having trouble with is printing the data (so I can check it is assigned correctly)! Help would be appreciated...
Cheers,In reply to Records question by dave8775
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |