monk2b has asked for the wisdom of the Perl Monks concerning the following question:
use warnings; use strict; my ($scalarone,$scalartwo,$scalarthree,$scalarfour,$scalarfive,@arrayo +ne,@arraytwo,%hashone); use lib("/tmp"); do "config.cfg"; print << "PRINT"; ######################################## Scalarone is $scalarone ######################################## Scalartwo is $scalartwo ######################################## Scalarthree is $scalarthree ######################################## Scalarfour is $scalarfour ######################################## scalarfive is $scalarfive ######################################## Arrayone is @arrayone ######################################## Arraytwo is @arraytwo ######################################## Hashone one is $hashone{ONE} Hashone two is $hashone{TWO} Hashone three is $hashone{THREE} Hashone four is $hashone{FOUR} Hashone five is $hashone{FIVE} ######################################## PRINT
# Scalar Variables $scalarone = "one"; $scalartwo = "two"; $scalarthree = "three"; $scalarfour = "four"; $scalarfive = "five"; # Array Variables @arrayone = ('one', 'two', 'three', 'four', 'five'); @arraytwo = ('six', 'seven', 'eight', 'nine', 'ten'); # Hash Variables %hashone = ( ONE => 'one', TWO => 'two', THREE => 'three', FOUR => 'four', FIVE => 'five');
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Moving variables to config file
by NetWallah (Canon) on Dec 15, 2007 at 04:31 UTC | |
|
Re: Moving variables to config file
by poolpi (Hermit) on Dec 15, 2007 at 10:13 UTC | |
|
Re: Moving variables to config file
by CountZero (Bishop) on Dec 15, 2007 at 09:23 UTC | |
|
Re: Moving variables to config file
by tuxz0r (Pilgrim) on Dec 15, 2007 at 17:21 UTC |