http://qs321.pair.com?node_id=506919


in reply to Re: Dynamic population of a hash
in thread Dynamic population of a hash

Forgive me, I'll be more specific. With the strings that will be read in from the file, how would I make the the mappings dynamically.. So if the first $T is /Workstation_X_X/<someotherpath>/filename.xxx, would I do something like:
foreach $T (@myfile) { %map = {'first', X, 'second', Y, 'third', Z); }
Now somes the other question, being so new to perl, how do would you parse the "/Workstation_X_X/<someotherpath>/filename.xxx" strings into the X,Y,Z? Using reg expression? grep? some magic?