in reply to multi-line (string doc) parsing
Anyway, a simple approach: pseudo-codish
As usual, untested and mostly not proofread. =) Point out errors as you see fit, of course this is a totally simple method of solving the problem...much cooler solutions abound.foreach (@lines) { next if (/-+/ || /^Sharename/); last if (/^Server/); my @vals = split /\s{2,}/; $hash{"$vals[0]"}{'Type'} = $vals[1]; $hash{"$vals[0]"}{'Comment'} = $vals[2]; }
Enjoy
Trinary
|
|---|