SPUG: parsing a config file
Andrew Sweger
andy at n2h2.com
Mon Jan 10 20:40:45 CST 2000
On Jan 10, 2000 @ 6:13pm, Todd Wells wrote:
> Well, this method has worked out great, but I'm having a problem as a result
> of this parentheses/square brackets issue.
>
> Here's the deal, if I feed this data to the routine:
> Domain = {
> servers = (beluga,toddw2,150.215.141.11);
> status = Enabled;
> };
>
> This becomes a problem when after winding all of this config data into
> nested hashes I have to unwind it back into a config file.
>
> Would it better if I turn those parens into brackets? Or do you have some
> other trick up your sleeve?
Use Jope's original suggestion. Turn parethesized lists into annonymous
arrays (square brackets).
--
Andrew Sweger <andy at n2h2.com> | N2H2, Incorporated
v=206.336.2947 f=206.336.1541 | 900 Fourth Avenue, Suite 3400
Advanced Technologies | Seattle WA 98164-1059
Development | http://www.n2h2.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe
Email to majordomo at pm.org: ACTION spug-list your_address
More information about the spug-list
mailing list