my @hostatt; push @hostatt, # Info for First host { 'value' => 'some value1', 'name' => 'URL', 'arg2' => undef, 'arg4' => undef, 'arg1' => 'someurl.com', 'arg3' => undef }; push @hostatt, # Info for Second host { 'value' => 'some value2', 'name' => 'URL2', 'arg2' => undef, 'arg4' => undef, 'arg1' => 'someur2.com', 'arg3' => undef }; #Finally, assign this to the main structure my $host = $ops->create_or_update_host( ip => 'nodename.com', name => "Name", hostgroup => { name => 'RDG - Prod Services' }, hosttemplates => [ { 'ref' => '/rest/config/hosttemplate/94 +', 'name' => 'AA-RDG-Pseudo-services' } ] +, hostattributes => \@hostatt, # <<< HERE <<<<< notification_period => { name => 'RDG-24x7-Minus-Bounce' } );
This is not an optical illusion, it just looks like one.
In reply to Re: Data Structure confusion...
by NetWallah
in thread Data Structure confusion...
by Spoon71
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |