Hi
Here is the printout after running the program.
I have added some hand typed comments out towards the right of the print out.
$ perl ip3.pl
(
"ip_params", # This is confirming the input
+file has been correctly read.
{
domain_name_server_1 => "8.8.8.9",
domain_name_server_2 => "8.8.4.9",
interface => "eth0",
ip_address => "192.168.10.9/24",
routers => "192.168.9.91",
},
)
(
"ip_params", # This is confirming that the f
+ormat is correct for the output file.
{
domain_name_servers => "8.8.8.9 8.8.4.9",
interface => "eth0",
ip_address => "192.168.10.9/24",
routers => "192.168.9.91",
},
)
found section for eth0 at line 8
Use of uninitialized value within %ip_params in concatenation (.) or s
+tring at ip3.pl line 73, <> line 9.
ip param key : # a print of the hash key $0 is
+ blank
Use of uninitialized value $1 in hash element at ip3.pl line 74, <> li
+ne 9.
Use of uninitialized value within %ip_params in concatenation (.) or s
+tring at ip3.pl line 74, <> line 9.
ip param val : # printing the hash value $1 is
+ blank.
set ip_address to 192.168.10.9/24
Use of uninitialized value within %ip_params in concatenation (.) or s
+tring at ip3.pl line 73, <> line 10.
ip param key :
Use of uninitialized value $1 in hash element at ip3.pl line 74, <> li
+ne 10.
Use of uninitialized value within %ip_params in concatenation (.) or s
+tring at ip3.pl line 74, <> line 10.
ip param val :
set routers to 192.168.9.91
Use of uninitialized value within %ip_params in concatenation (.) or s
+tring at ip3.pl line 73, <> line 11.
ip param key :
Use of uninitialized value $1 in hash element at ip3.pl line 74, <> li
+ne 11.
Use of uninitialized value within %ip_params in concatenation (.) or s
+tring at ip3.pl line 74, <> line 11.
ip param val :
set domain_name_servers to 8.8.8.9 8.8.4.9
ending changes at line 12
So I can't figure out where or how $1 should be initiated.