ENV: win2k/TS552.
I have a cgi menu item that updates a workarea from a ipl script that includes an array of files. If I have a 100 files in the array, then the cgi window and log file will not output the complete list. The cgi will end like this:
Found File or Directory: images/faqs
COMMAND:iwupdate -w -r Y:\default\main\bp_com2003\STAGING\wwwroot Y:\default\main\bp_co
The log file will end like this:
Found File or Directory: images/in_your_area
COMMAND:iwupdate -w -r Y:\default\main\bp_com2003\STAGING\wwwroot Y:\default\main\bp_com2003\WORKAREA\design
Found File or Direct
The script is this:
#!c:\iw-home\iw-perl\bin\iwperl
#
# copy_files_2003.ipl
#
# Script to
# copy the directories listed in
@list_of_dirs to
# the 'main' workarea in the main/BP_COM2003 branch
#
# Note that anything (file or directory) listed in
@list_of_dirs# must exist in the target workarea before it will be copied.
# Any sub-directories or files do not need to exist prior
# to being copied.
#
# Files only copied over once published
#
use CGI; #Use CGI.pm Perl Module
$page = new CGI; #New CGI Object
$| =1; #Autoflush the buffer
$ENV{LD_LIBRARY_PATH}= 'c:\iw-home\iw-perl\site\5.00503\lib';
print $page->header( 'text/html; charset=UTF-8' ); #Print Header
print "<HTML><HEAD><TITLE>Copy files from bp_com2002 > bp_com2003</TITLE></HEAD><BODY>";
#Open log file - note opened for append (Hence >> rather than > for overwrite)
open LOG, ">>c:/iw-home/local/logs/copy_files_2003.log";
print LOG "*********************** NEW ENTRY **************** \n";
print "<b>Starting copy of updated files from bp_com2002 > bp_com2003</b><br>If no return from COMMAND then no files have been updated in this directory<br><br>";
#This array gives the list of directories and files to copy
#The directories/files are under wwwroot
my
@list_of_dirs = ('__reloadmenus.asp',
'admin',
'admin_new',
'bponthestreet',
'bp_businesses',
'centres/energy2002',
#with a 100 files the abovementioned output results
#with the above amount of files, the script will print correctly
#in fact the actual get latest is always working, it is only the printing that fails.
foreach $subdir (
@list_of_dirs){ if ($subdir ne ""){
#Use iwupdate to copy the files
print LOG "Found File or Directory: $subdir \n";
print "<br><b>Found File or Directory: $subdir </b><BR>";
my $cmd = 'iwupdate -w -r Y:\default\main\bp_com2003\STAGING\wwwroot Y:\default\main\bp_com2003\WORKAREA\design';
my $returnstring=`$cmd`;
print LOG "COMMAND:$cmd \n";
print LOG "$returnstring \n";
print "COMMAND:$cmd \n";
print "$returnstring \n";
}
}
I have run through some perl sources on print and on the web, but I am not experienced enough in Perl to get the answer to this one. The error also occurs when leaving out the print to the LOG file.
Does anybody know an answer to this one?
arnout