kurt2439 has asked for the wisdom of the Perl Monks concerning the following question:
And the Config.pm file#!/usr/bin/perl use strict; use warnings; require 'Config.pm'; print "Hash: ",%Config::amazon_config,"\n"; print "Host: ",$Config::amazon_config{'host'},"\n"; print "Name: ",$Config::amazon_config{name},"\n";
When run it returns:package Config; my %amazon_config = ( 'name' => 'amazon', 'host' => 'localhost', 'user' => 'amazon', 'pass' => 'somepass', 'upload_path' => '/', 'file_types' => [ qw( jpg mobi ) ], ); 1;
Hash: Use of uninitialized value in print at Objects.pl line 15. Host: Use of uninitialized value in print at Objects.pl line 16. Name:
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Package Variables
by Eliya (Vicar) on Mar 27, 2011 at 19:28 UTC | |
by ELISHEVA (Prior) on Mar 28, 2011 at 04:00 UTC | |
by kurt2439 (Sexton) on Mar 27, 2011 at 19:40 UTC | |
by Anonymous Monk on Mar 27, 2011 at 19:52 UTC | |
by kurt2439 (Sexton) on Mar 28, 2011 at 04:12 UTC | |
by Anonymous Monk on Mar 28, 2011 at 07:23 UTC | |
| |
by toolic (Bishop) on Mar 27, 2011 at 20:11 UTC | |
Re: Package Variables
by Corion (Patriarch) on Mar 27, 2011 at 19:18 UTC | |
Re: Package Variables
by toolic (Bishop) on Mar 27, 2011 at 19:33 UTC | |
by kurt2439 (Sexton) on Mar 27, 2011 at 19:44 UTC | |
Re: Package Variables
by wind (Priest) on Mar 27, 2011 at 20:12 UTC |