Re: Putting values into hash

2002-06-12 Thread drieux
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

RE: Putting values into hash

2002-06-12 Thread Felix Geerinckx
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 = ()

RE: Putting values into hash

2002-06-12 Thread Anders Holm
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

Re: Putting values into hash

2002-06-11 Thread Janek Schleicher
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 \ >

Re: Putting values into hash

2002-06-11 Thread drieux
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

RE: Putting values into hash

2002-06-11 Thread Nikola Janceski
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

Re: Putting values into hash

2002-06-11 Thread Tor Hildrum
> 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

RE: Putting values into hash

2002-06-11 Thread Nikola Janceski
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