From owner-freebsd-questions@FreeBSD.ORG Mon Apr 26 10:03:30 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 787BE16A4CF for ; Mon, 26 Apr 2004 10:03:30 -0700 (PDT) Received: from ex-nihilo-llc.com (ex-nihilo-llc.com [206.114.147.90]) by mx1.FreeBSD.org (Postfix) with ESMTP id DD6BC43D66 for ; Mon, 26 Apr 2004 10:03:29 -0700 (PDT) (envelope-from aaron@alpete.com) Received: from mail.alpete.com (localhost [127.0.0.1]) by ex-nihilo-llc.com (Postfix) with SMTP id DC147100; Mon, 26 Apr 2004 13:07:22 -0400 (EDT) Received: from 204.118.78.206 (SquirrelMail authenticated user aaron@alpete.com) by mail.alpete.com with HTTP; Mon, 26 Apr 2004 13:07:23 -0400 (EDT) Message-ID: <58959.204.118.78.206.1082999243.squirrel@mail.alpete.com> In-Reply-To: <408D3DD7.1050607@mykitchentable.net> References: <408D3DD7.1050607@mykitchentable.net> Date: Mon, 26 Apr 2004 13:07:23 -0400 (EDT) From: "Aaron Peterson" To: "Drew Tomlinson" User-Agent: SquirrelMail/1.4.2 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal cc: FreeBSD Questions Subject: Re: Perl Help For Newbie X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: aaron@alpete.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Apr 2004 17:03:30 -0000 > 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)