If you want to read things inside a file, as if the text inside it is config data- you want to use something like YAML to code with. If what you want is to be able to associate metadata (like the filename) onto a file, any kind of file- you can use File::Attributes::Extended or File::PathInfo::Ext