Perl string replacement within an array?
I have an array that gets it's data by stripping version files.
So the array looks sort of like: mtasd modulew foo1 bar2 etc1 etc2 Is there a way that I can manipulate those, yet hold their place in the array? What I'd like to do is define some "real" names for the modules in the array, so that if in a loop: - I print out $var - The loop's on it's third pass - The third string in the array is "foo1" I'd like to define "foo1" as "Foo Program Number 1". What I do is loop two arrays, and print them in sequence. One's the module name, one's the version number. Right now it outputs as: foo1 1.2.3.4 If I can add some kind of replacement variable for "foo1", I could output my data as: Foo Program Number 1 (is) 1.2.3.4 Any insight appreciated. :) |
Here's the full script btw, in case I'm completely explaining it wrong. :)
Code:
|
All times are GMT -5. The time now is 09:34 PM. |