Posted on 2006-06-13 12:57:59-07 by cmarbacher in response to 2471
Re: Example: missing right curly bracket on line 15
And here is a version that works in my environment. I simply removed the square brackets on lines 17, 22 and 23. I also modified lines 5 and 12 to ask only current devices (C). I still have a warning that reports an uninitialized value in concatenation (line 8) and an undefined subroutine &main::odm_classes on line 12. --- SOURCE --- use AIX::ODM; my %odm = odm_dump('C'); while ( ($ndx1, $lev2) = each %odm ) { while ( ($ndx2, $val) = each %$lev2 ) { print "odm{${ndx1}}{${ndx2}} = ${odm{${ndx1}}{${ndx2}}}\n"; } } my %dev = odm_classes('C'); foreach ${devname} ( keys %dev ) { print "dev{${devname}} = ${dev{${devname}}}\n"; } my %attribs = odm_attributes($dev{'devname'}); foreach ${attrname} ( keys %attribs ) { print "attribs{${attrname}} = ${attribs{${attrname}}}\n"; } my ${devclass} = odm_class('C|P',$dev{'devname'}); my ${devsubcl} = odm_subclass('C|P',$dev{'devname'});
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.