I'm a rookie in Perl scripting, and I have a task to do.
Generally it's something like that:
I have a reference file consisting of a number and name, tab-separated. One entry in one line, about 99 lines in file.
The other file is an XML log file, where in one specific branch, eg. <id> there's a number.
All I have to do, is to (I guess) get the first file into hash array and compare it to the XML. If script finds the number, it displays it's name from array.
But.. How to do it? Can anyone help me, please?
A piece of code, clues or something?
and the script, when finds xml's <id> field should write proper value, like "name001" for id=001. When <id> is not listed in first reference file, some error msg should occur. The output should be on-screen only, no need to write to new file.