Should that be $file ||= $data->{file}; to allow command line to override file name.