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:
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?foreach $T (@myfile) { %map = {'first', X, 'second', Y, 'third', Z); }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Dynamic population of a hash
by friedo (Prior) on Nov 08, 2005 at 22:19 UTC | |
Re^3: Dynamic population of a hash
by GrandFather (Saint) on Nov 08, 2005 at 22:20 UTC | |
Re^3: Dynamic population of a hash
by Roy Johnson (Monsignor) on Nov 08, 2005 at 22:45 UTC | |
by Anonymous Monk on Nov 09, 2005 at 15:12 UTC | |
by Roy Johnson (Monsignor) on Nov 09, 2005 at 15:41 UTC |
In Section
Seekers of Perl Wisdom