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');
In reply to Moving variables to config file by monk2b
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |