develooper Front page | perl.beginners | Postings from December 2002

RE: Config::Ini

Thread Previous | Thread Next
Hanson, Rob
December 11, 2002 08:56
RE: Config::Ini
Message ID:
You use "exists" on a hash key, not an entire hash...

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


-----Original Message-----
From: Paul Kraus []
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

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About