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 "blah blah $!";
> > undef $/; ## or local $/ if in a BLOCK
> > $contents = <FILE>;
> > 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 right?
> > }
> 
> Since there are more than 1 param on each line, wouldn't it be:
> my @array = split (/\s+/, $contents); #?
> 
> >> Parameter=Value1 Value2 Value3 \
> >> Value4 Value5 Value6 \
> >> Value7 Value8
> 
> After:
> > $contents = <FILE>;
> > close FILE;
> > 
> > $contents =~ s/\\\n//g;
> 
> $contents = qw(Parameter=Value1 Value2 Value3 Value4 Value5 
> Value6 ..); # ?

WRONG:
$contents would actually have qq{Parameter=Value1 Value2 Value3 Value4
Value5
Another_Parameter=Value1 Value2 Value3 Value4 Value5
And_so_on=Value1 Value2 Value3 Value4 Value5
}


> 
> s/\\\n|\w+=//g;
> 
> ?
> 
> Tor
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

----------------------------------------------------------------------------
--------------------
The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and opinions of Summit
Systems Inc.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to