Uh, never mind.  I expected the output to display to STDOUT.  When I opened
the 'rpt' file, voila! there sat my report.


----- Original Message -----
From: "Brian Warn" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 31, 2001 3:50 PM
Subject: report format/output question


Hello,

I'm trying to do something fairly simple:  read in colon-delimited data from
a file and output it to the screen first.  After that is OK, I want to send
it in an email.  The syntax checks out OK, but nothing outputs.  Does anyone
see what I'm missing?

Thanks,
Brian
--------------------------
#!/usr/bin/perl -w
# report.pl

open(BW, "> rpt") || die "Can't open rpt.out: $!\n";
select(BW);
format BW_TOP=
      LOGS WITH DIFFERENT FILESIZES
DATE     FILENAME           LOCAL SIZE  REMOTE SIZE
____________________________________________________________________________
________________
.
format BW =
@<<<<<<<<@>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>@>>>>>>>>>>>>>>@>
>>>>>>>>>>>>>>>>
$currdate, $logfile1, $fsize, $rsize
.
open(DISCREP, "< fail.txt") || die "Can't open fail.out for reading: $!\n";
while(<DISCREP>)
{
 ($currdate,$logfile1,$fsize,$rsize)=split(/:/,$_);
 write;
}
close(DISCREP);
close(BW);



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

Reply via email to