IDL(3pm) | User Contributed Perl Documentation | IDL(3pm) |
PDL::IO::IDL -- I/O of IDL Save Files
PDL::IO::IDL allows you to read and write IDL(tm) data files.
Currently, only reading is implemented. Scalars, arrays, and structures are all supported. Heap pointers, compiled code, and objects are not supported. Of those three, only heap pointers are likely to be supported in the future.
This code was not developed by RSI, makers of IDL.
These things seem to work:
These things are known to be not working and may one day be fixed:
These things are known to be not working and will probably never be fixed
$x = ridl("foo.sav");
Read an IDL save file from a file.
Upon successful completion, $x is a hash ref containing all of the variables that are present in the save file, indexed by original variable name.
IDL identifiers are case insensitive; they're all converted to upper-case in the hash that gets returned. This may be adjustable at a future date. Furthermore, because IDL identifiers can't contain special characters, some fields that start with '+' are used to store metadata about the file itself.
Numeric arrays are stored as PDLs, structures are stored as hashes, and string and structure arrays are stored as perl lists. Named structure types don't exist in perl in the same way that they do in IDL, so named structures are described in the 'structs' field of the global metadata. Anonymous structures are treated as simple hashes. Named structures are also simple hashes, but they also contain a field '+name' that refers to the name of the structure type.
THIS CODE IS PROVIDED WITH NO WARRANTY and may be distributed and/or modified under the same terms as PDL itself.
This code is based on the analysis of the IDL save file format published by Craig Markwardt in 2002.
IDL is a trademark of Research Systems Incorporated (RSI). The PDL development team, and authors of this code, are not affiliated with RSI.
2023-04-27 | perl v5.36.0 |