perl -MData::Dumper -e '
$conf = {
DEVICE => 'eth0',
ONBOOT => 'yes',
BOOTPROTO => 'static',
TYPE => 'Ethernet',
IPADDR => '10.9.0.200',
NETMASK => '255.255.0.0',
GATEWAY => '10.9.1.254',
};
open( $fh, ">", "monkConfig.txt" ) or die;
print $fh Data::Dumper->Dump([$conf],["config"]);
'
####
$config = {
'TYPE' => 'Ethernet',
'ONBOOT' => 'yes',
'NETMASK' => 255.255.0.0,
'GATEWAY' => 10.9.1.254,
'DEVICE' => 'eth0',
'IPADDR' => 10.9.0.200,
'BOOTPROTO' => 'static'
};
##
##
perl -le 'require "monkConfig.txt";
print $config->{'TYPE'};
'
__output__
Ethernet