in reply to Re: Multiline variables
in thread Multiline variables
Voila :) Only thing that doesnt fit is why would I sometime get an undefined value? regards, ta- Read a complete text file into a scalar - Split on 0 so we get multiline "blocks" of text and put them into an + array - Go through each element in the list and split it up further into fou +r blocks. - The fourth block is what we want. Split it up on \n to get each indi +vidual line into an array. - Go through each element (line), check is it empty (eq "") then skip +to the next - Finally do our last split, on where we get a "descriptor" and a "des +cribed" - Add them to a hash as key/value pair.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Multiline variables
by jrsimmon (Hermit) on Mar 09, 2010 at 15:07 UTC | |
by theantler (Beadle) on Mar 09, 2010 at 17:44 UTC | |
by theantler (Beadle) on Mar 10, 2010 at 17:44 UTC |