The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 05-16-2008
Harikrishna Harikrishna is offline
Registered User
 

Join Date: Feb 2008
Posts: 38
Perl config file Help

Hi

can anyone help me understanding the following code

Code:
    my %config;
    open my $config, '<', 'config.txt' or die $!;
    while(<$config>) {
        chomp; 
        (my $key, my @value) = split /=/, $_;
        $config{$key} = join '=', @value;
    }

Last edited by Yogesh Sawant; 05-19-2008 at 04:16 AM. Reason: added code tags
Reply With Quote
Forum Sponsor