R
Rocky Allen
on my system, SLES9 I get a random error about the IPC::Open3 module
called in the code posted below. I thought to post to the modules group,
but IPC::Open3 seems native to the core install. Here is the error,
followed by the code. Thanks.
Rocky
ERROR:
IPC::Open3 version 58 required --this is only version 1.01 06
#!/usr/bin/perl
use strict;
use warnings;
use Sys::Hostname;
use IPC::Open3
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
localtime(time);
my $actyear = $year + 1900;
my $actmon = $mon + 1;
if ($mon < 10) {$actmon = "0" ."$actmon";};
if ($min < 10) {$min = "0" ."$min";};
if ($sec < 10) {$sec = "0" ."$sec";};
if ($mday < 10) {$mday = "0" ."$mday";};
if ($hour < 10) {$hour = "0" ."$hour";};
my $error ;
my @errors;
# Variables. This section will need to be modified for each Cooperative.
my $host = hostname;
my $backupdir = '/backup/scripts/files';
my $jobstart = localtime();
my $fileformat = "contents-" . "$actyear" . "-" . "$actmon" . "-" .
"$mday" . "_" . "$hour" . ":" . "$min" . ":" . "$sec";
my $largefiles = '/tmp/largefiles';
my $contentsfile = "/etc/backup/$fileformat";
system("cd $backupdir ; find . -follow -size +2000000k -print >
$largefiles");
push @errors, "could not open Filehandle to get large files: $?\n" if
defined($error);
print "I made it here\n";
open(FH, $largefiles) or $error = 1;
push @errors, "could not open Filehandle to get large files: $!\n" if
$error;
called in the code posted below. I thought to post to the modules group,
but IPC::Open3 seems native to the core install. Here is the error,
followed by the code. Thanks.
Rocky
ERROR:
IPC::Open3 version 58 required --this is only version 1.01 06
#!/usr/bin/perl
use strict;
use warnings;
use Sys::Hostname;
use IPC::Open3
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
localtime(time);
my $actyear = $year + 1900;
my $actmon = $mon + 1;
if ($mon < 10) {$actmon = "0" ."$actmon";};
if ($min < 10) {$min = "0" ."$min";};
if ($sec < 10) {$sec = "0" ."$sec";};
if ($mday < 10) {$mday = "0" ."$mday";};
if ($hour < 10) {$hour = "0" ."$hour";};
my $error ;
my @errors;
# Variables. This section will need to be modified for each Cooperative.
my $host = hostname;
my $backupdir = '/backup/scripts/files';
my $jobstart = localtime();
my $fileformat = "contents-" . "$actyear" . "-" . "$actmon" . "-" .
"$mday" . "_" . "$hour" . ":" . "$min" . ":" . "$sec";
my $largefiles = '/tmp/largefiles';
my $contentsfile = "/etc/backup/$fileformat";
system("cd $backupdir ; find . -follow -size +2000000k -print >
$largefiles");
push @errors, "could not open Filehandle to get large files: $?\n" if
defined($error);
print "I made it here\n";
open(FH, $largefiles) or $error = 1;
push @errors, "could not open Filehandle to get large files: $!\n" if
$error;