On Wednesday, June 12, 2002, at 05:16 , Anders Holm wrote:
> Well, just to sum it up, how I finished this one off:
Looks reasonably good there.
The things uncle drieux wants are
a) Internal comment bars that will remind you
a1) where you ripped off which ideas from wh
on Wed, 12 Jun 2002 12:16:55 GMT, [EMAIL PROTECTED] (Anders
Holm) wrote:
> I have a feeling that there will be takers for optimising this as
> well, so enlighten me if you wish
With a little help from the Cookbook I came up with this:
#! perl -w
use strict;
my %parameters = ()
s
Anders Holm
Critical Path Technical Support Engineer
--
Tel USA/Canada: 1 800 353 8437
Tel Worldwide: +1 801 736 0806
E-mail: [EMAIL PROTECTED]
Internet: http://support.cp.net
-Original Message-
From: drieux [mailto:[EMAIL PROTECTED]]
Sent: 11 June 2002 16:15
To: Anders H
Anders Holm wrote at Tue, 11 Jun 2002 15:39:34 +0200:
> Hi folks!
>
> Well, here's one I'm just not getting to grips with.
>
> I'm parsing a configuration file for an application, and it has a parameter as such:
>
> Parameter=Value1 Value2 Value3 \
> Value4 Value5 Value6 \
>
On Tuesday, June 11, 2002, at 06:39 , Anders Holm wrote:
[..]
> I'm parsing a configuration file for an application, and it has a
> parameter
> as such:
>
> Parameter=Value1 Value2 Value3 \
> Value4 Value5 Value6 \
> Value7 Value8
>
> There are other parameters before
See inline comments:
> -Original Message-
> From: Tor Hildrum [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 11, 2002 12:01 PM
> To: Perl
> Subject: Re: Putting values into hash
>
>
> > read the filein...
> >
> > open(FILE, $file) or die &q
> read the filein...
>
> open(FILE, $file) or die "blah blah $!";
> undef $/; ## or local $/ if in a BLOCK
> $contents = ;
> close FILE;
>
> $contents =~ s/\\\n//g; # put everything on one line (deletes \ followed by
> newline)
>
> foreach (split /\n/, $contents){
> ## you can figure this part
read the filein...
open(FILE, $file) or die "blah blah $!";
undef $/; ## or local $/ if in a BLOCK
$contents = ;
close FILE;
$contents =~ s/\\\n//g; # put everything on one line (deletes \ followed by
newline)
foreach (split /\n/, $contents){
## you can figure this part out righ