in reply to Re: How do I read .pag files
in thread How do I read .pag files

file FILENAME is giving 'data' as an output

hexdump -C FILENAME | head gave no result

"file" would say "empty" if the file was empty, so hexdump must have generated output. What does the output of hexdump look like?

Replies are listed 'Best First'.
Re^3: How do I read .pag files
by sachinz2 (Acolyte) on Apr 12, 2017 at 11:35 UTC
    $file filename.state.pag filename.state.pag: data
    $hexdump -C filename.state.pag hexdump: filename.state.pag: No such file or directory hexdump: filename.state.pag: Bad file descriptor

      is there a filename.state.dir file too? if so based on the link from marto this may work;

      use strict;; use warnings; use Fcntl; # For O_RDWR, O_CREAT, etc. use SDBM_File; my $filename='filename.state'; my %hash; tie(%hash, 'SDBM_File', $filename, O_RDWR|O_CREAT, 0666) or die "Couldn't tie SDBM file 'filename': $!; aborting"; use Data::Dumper; print Dumper(\%hash);
      I would make a copy of the two files first, then run off of the copies, just to make sure.

        Thanks Monks

        I had come to exact same solution as @huck

        But thanks anyways