drodinthe559 has asked for the wisdom of the Perl Monks concerning the following question:
Help would be appreciated. Dave R.#!/usr/bin/perl -w use strict; use warnings; use File::Copy; open(LOGFILE, ">> C:/Logs/RPT_APPEND.log"); my $targetfile = "C:/testrpt.txt"; my $procdate = sprintf "%04d%02d%02d %02d:%02d:%02d", (localtime)[5]+1 +900, (localtime)[4]+1, (localtime)[3], (localtime)[2], (localtime)[1] +, (localtime)[0]; my @rpts = glob('//testserver/dir/*'); foreach my $x (@rpts) { print $x . "\n"; copy($x, $targetfile); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Append Text Files
by BioLion (Curate) on Oct 09, 2009 at 17:24 UTC | |
by drodinthe559 (Monk) on Oct 09, 2009 at 17:37 UTC | |
by BioLion (Curate) on Oct 09, 2009 at 17:44 UTC | |
by drodinthe559 (Monk) on Oct 09, 2009 at 17:52 UTC | |
by drodinthe559 (Monk) on Oct 09, 2009 at 19:01 UTC | |
by BioLion (Curate) on Oct 10, 2009 at 10:56 UTC | |
|
Re: Append Text Files
by bv (Friar) on Oct 09, 2009 at 17:46 UTC | |
|
Re: Append Text Files
by NetWallah (Canon) on Oct 09, 2009 at 20:51 UTC | |
|
Re: Append Text Files
by llancet (Friar) on Oct 10, 2009 at 07:36 UTC |