Flubb has asked for the wisdom of the Perl Monks concerning the following question:
I've been following a previous answer:#!/usr/local/bin/perl -w use strict; use Env qw(COMPUTERNAME); use Tie::File; use File::Copy; my(@cvscommits) = ""; my($cvscommits) =""; my($buildresultserver) = "\\\\Cvs3b\\stuff\\"; my($htmloldfile) = "Verification_Builds1.html"; print "Going to server!\n"; chdir $buildresultserver or die "Cannot change to cvs3b $!\n"; print "going to tie the file\n"; tie @cvscommits, 'Tie::File', "$htmloldfile", or die "Cannot open $htm +loldfile $!\n"; for (@cvscommits) { if (/<th>PC Number<\/th><th>Cores<\/th><th>Date<\/th><th>Customer< +\/th><th>Target<\/th><th>C\/O Time<\/th><th>Build Time<\/th><th>Statu +s<\/th><th>Changes from Last Build<\/th><tr>/) { print "Whee found it \n"; $_ .= "<td><a href=\"\\\\$COMPUTERNAME\\$softdev\\$dirtime\"<b +>$COMPUTERNAME</b></a></td><td>$processors</td><td>$dirtime</td><td>$ +cust</td><td>$target</td><td>$cotime</td><td>$buildtime</td><td>$resu +lt</td><tr>@cvscommits</tr>\n"; last; }} untie @cvscommits;
<html> <head> <title> BUILD ENVIRONMENT INFORMATION </title> <STYLE type="text/css"> </STYLE> </head> <body><hr> <h2><center> Daily Verification </center></h2> <table border="1"> <tr> <th>PC Number</th><th>Cores</th><th>Date</th><th>Customer</th><th>Targ +et</th><th>C/O Time</th><th>Build Time</th><th>Status</th><th>Changes + from Last Build</th><tr>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Tie::File insertion problem
by citromatik (Curate) on Jan 31, 2008 at 16:47 UTC | |
by Flubb (Acolyte) on Feb 01, 2008 at 10:33 UTC |