OK, heres my bit of code. I don't think it's anything to do with write access to the text file as the script successfully prints "Test" to the file. However, for some reason it does not print the contents of the @info array..
use P4;
open OUTFILE, ">.\\Testing.txt";
my $p4 = new P4;
$p4->SetClient( "my-client" );
$p4->SetPort ( "Perforce01:xxxx" );
$p4->SetPassword( "my-password" );
$p4->Init() or die( "Failed to connect to Perforce Server" );
$p4->Login();
my $command = "describe";
my @options;
push @options, "-s", "577536";
my @info = $p4->Run( $command, @options );
my @errors = $p4->Errors();
$p4->Disconnect();
foreach my $line (@info)
{
print OUTFILE $line;
}
print OUTFILE "Test";
close OUTFILE;
|