While trying to use this .pl file, it was discovered that the use of "defined' with arrays has been deprecated in Perl. Thus the line:
"if (defined(@{$host->{'ports'}->[0]->{'ports'}})) {"
fails under Perl V5.22, returning the error message -
"Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at c:\test\nmapxml2mm.pl line 71."
If the statement is corrected to read:
"if (@{$host->{'ports'}->[0]->{'port'}}) {"
then the program runs to completion and provides the requested .mm file
There are two places requiring this correction - lines 75 and 91 in the source file. Once the corrections are made the program produces the correct output.
While trying to use this .pl file, it was discovered that the use of "defined' with arrays has been deprecated in Perl. Thus the line:
fails under Perl V5.22, returning the error message -
"Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at c:\test\nmapxml2mm.pl line 71."
If the statement is corrected to read:
then the program runs to completion and provides the requested .mm file
There are two places requiring this correction - lines 75 and 91 in the source file. Once the corrections are made the program produces the correct output.