- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc:
Sent: Friday, August 26, 2005 10:37 PM
Subject: Re: Need an explanation
> maybe this is brief:
>
> while (<>) {
> chomp;
> next if /^#/;
> next if /^
Binish A R wrote:
> I've a file, which has entries like the following ...
>
> IDENTIFIER1=value1;
> IDENTIFIER2=value2;
> IDENTIFIER3=value3;
>
> etc
>
> I've got to parse the above file and am using a hash to do the same ...
Have you thought about using one of the many modules on CPAN that doe
Sent: Fri, 26 Aug 2005 23:04:58 +0530
Subject: Re: Need an explanation
[EMAIL PROTECTED] wrote: maybe this is brief:
while (<>) {
chomp;
next if /^#/;
next if /^$/;
my ($var1,$var2)=split /=/;
$CONF{$var1}=$var2;
}
while (<>) {
chomp;
next if /^#/;
next if /^$/;
$CONF{(split/=/)[0]}=(split/=/)[1];
}
-Original Message-
From: Binish A R <[EMAIL PROTECTED]>
To: Perl Beginners
Cc: [EMAIL PROTECTED]
Sent: Fri, 26 Aug 2005 23:04:58 +0530
Subject: Re: Need an explana
To: Perl Beginners
Sent: Fri, 26 Aug 2005 22:28:22 +0530
Subject: Need an explanation
I've a file, which has entries like the following ...
IDENTIFIER1=value1;
IDENTIFIER2=value2;
IDENTIFIER3=value3;
etc
I've got to parse the above file and am using
maybe this is brief:
while (<>) {
chomp;
next if /^#/;
next if /^$/;
my ($var1,$var2)=split /=/;
$CONF{$var1}=$var2;
}
-Original Message-
From: Binish A R <[EMAIL PROTECTED]>
To: Perl Beginners
Sent: Fri, 26 Aug 2005 22:28:22 +0530
Subj
I've a file, which has entries like the following ...
IDENTIFIER1=value1;
IDENTIFIER2=value2;
IDENTIFIER3=value3;
etc
I've got to parse the above file and am using a hash to do the same ...
Here is my code ...
while (<>) {
chomp;
next if /^#/;
next if /^$/;
%CONF =