in reply to Unwrapping values in a template
use strict; use warnings; use Data::Dumper; use Config::General; my %config = ParseConfig(\*DATA); for (keys %{$config{template}}) { if (/^http/) { $config{template}{home_url} = $_; delete $config{template}{$_}; last; } } print Dumper \%config; __DATA__ <template> foo = Yes bar = 0 blort = home_url = http://www.foo.com/some/really/long/url </template>
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Unwrapping values in a template
by hacker (Priest) on Nov 15, 2003 at 02:26 UTC | |
by Anonymous Monk on Nov 15, 2003 at 03:16 UTC | |
by hacker (Priest) on Nov 15, 2003 at 17:56 UTC | |
by Anonymous Monk on Nov 15, 2003 at 19:14 UTC |