You use "exists" on a hash key, not an entire hash...

if (exists $ini{$section}{email}){
 ...
}

Rob


-----Original Message-----
From: Paul Kraus [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 11, 2002 11:51 AM
To: Perl
Subject: Config::Ini


When I run my program I get this error at this line.

[root@fileserver pdkbackup]# ./backup
exists argument is not a HASH or ARRAY element at ./backup line 29.

if (exists %{$ini{$section}}, email){
      print "$ini{$section}{email}\n\n";
  }

This statement is taken verbatim from the perldoc Config::Ini

Paul Kraus
Network Administrator
PEL Supply Company
216.267.5775 Voice
216-267-6176 Fax
www.pelsupply.com


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

Reply via email to