Re: Need an explanation

2005-08-27 Thread Manav Mathur
- 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 /^

Re: Need an explanation

2005-08-26 Thread John W. Krahn
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

Re: Need an explanation

2005-08-26 Thread Binish A R
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; }

Re: Need an explanation

2005-08-26 Thread angelflowercn
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

Re: Need an explanation

2005-08-26 Thread Binish A R
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

Re: Need an explanation

2005-08-26 Thread angelflowercn
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

Need an explanation

2005-08-26 Thread Binish A R
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 =