[p4perl] P4 Print

Kornelius.Elstner at mdsuk.com Kornelius.Elstner at mdsuk.com
Thu Aug 11 06:07:25 PDT 2005



> Tony Smith <tony at smee.org> wrote on 10/08/2005 14:57:25:
> It works for me (with 3.5067). Can you send me a sample file?

Yup, it works for me too, my mistake. I did not realise the file comes back
in blocks, thus to get the contents of a text file from the depot I changed
my code along the lines of:

my @blocks = $p4->Print('//depot/dir/file.txt');
if (@blocks) {
   my $fstat = shift @blocks; # first 'block' contains file info
   my $contents = join '', @blocks;

   # use $contents...
}



More information about the p4perl mailing list