Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Apr 2004 13:07:23 -0400 (EDT)
From:      "Aaron Peterson" <aaron@alpete.com>
To:        "Drew Tomlinson" <drew@mykitchentable.net>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: Perl Help For Newbie
Message-ID:  <58959.204.118.78.206.1082999243.squirrel@mail.alpete.com>
In-Reply-To: <408D3DD7.1050607@mykitchentable.net>
References:  <408D3DD7.1050607@mykitchentable.net>

next in thread | previous in thread | raw e-mail | index | archive | help
> Any guidance as to the best way to approach this task would be most
> appreciated.  I've
> done lots of reading but haven't found anything that teaches me how to
> "think" about
> building this script.

probably the best way to approach this is writing a script to generate the
complete html in multiple formats instead of writing a script to search
through html to find values, calculate, and replace.  what i mean, is if
you had a single file with the US dollar values for everything, then you
wrote a script that used those values to generate complete html pages
(doing whatever conversions you needed in the process), that would
probably be easier than searching through pre-existing html and doing
substitution via regex.  then in the future you would only have to change
prices in one place and re-run the script, or change the conversion
algorithm and rerun the script to get all new html pages.  (html, xml and
other markup is notoriosly difficult to regex)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?58959.204.118.78.206.1082999243.squirrel>