Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Thanks for looking!#!/usr/bin/perl -w use strict; use CGI qw(-oldstyle_urls :standard); use CGI::Carp qw(fatalsToBrowser); use Date::Calc qw( Add_Delta_Days Decode_Date_US Today ); my $q = new CGI; my @todays; @todays = Today() unless ($ARGV[0] && (@todays = Decode_Date_US( $A +RGV[0] ))); my $page = "\n\n"; #my $page = "<br><br>"; # yesterday's date my @yesterday = Add_Delta_Days( @todays, -1 ); my $forms = " %-16s %-22s %-15s %-5s %s\n"; #my $forms = " %-16s %-22s %-15s %-5s %s<br>"; my $t_string = sprintf "%04d-%02d-%02d", @todays; my $y_string = sprintf "%04d-%02d-%02d", @yesterday; =code $page .= "<table width=\"100%\" border=\"0\" bgcolor=\"#ffffff\" cell +padding=\"0\" cellspacing=\"0\"> <tr> <td width=\"60%\">Date Format Sample:</td> <td width=\"40%\" align=\"left\"><b>$y_string</b></t +d> </tr> <tr> <td width=\"100%\" colspan=\"2\"> </td> </tr> </table>"; =cut $page .= sprintf $forms, "TODAY", "YESTERDAY"; $page .= " ---------------------------------------------------------- +--------------\n"; $page .= " ----------$t_string - $y_string-----------\n"; print $page;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Report Format Help!
by wind (Priest) on Feb 04, 2011 at 21:07 UTC | |
by Anonymous Monk on Feb 04, 2011 at 21:43 UTC | |
|
Re: Report Format Help!
by Anonymous Monk on Feb 04, 2011 at 21:46 UTC | |
by 7stud (Deacon) on Feb 04, 2011 at 21:53 UTC | |
by Anonymous Monk on Feb 05, 2011 at 00:14 UTC | |
by poj (Abbot) on Feb 05, 2011 at 20:57 UTC | |
by 7stud (Deacon) on Feb 05, 2011 at 22:20 UTC |