Sorry tybalt89 and others. Here is the table that this will fit into. $dsrd = the date the script will provide.
print "<tr><td colspan=12 class=\" f-width td-border0\"><label name=\" +Rep_name\" size=\"45\" class=\"font-large font-faceA\">REPORT NAME: & +nbsp; <B>$Rep_name</label></B></td></tr>\n"; #print "<td class=\"s-width td-border0\"><span name=\"Rep_name\" type= +\"text\" value=\"$Rep_name\" size=\"10\" class=\"font-large align-cen +ter\" /></td></tr>\n"; print "<tr><td colspan=12 class=\"l-width td-border0\"><label name=\"D +srd\" size=\"35\" class=\"font-large font-faceA\">DAILY SALES REPORT +DATE: <font face=arial size=2><B>(Enter date as \"MM/DD/YYYY\")</B></ +font></label></td>\n"; print "<td class=\"l-width td-border0\"><input type=\"text\" name=\"Ds +rd\" value=\"$Dsrd\" size=\"10\" class=\"font-large align-center\" /> +</td></tr>\n"; print "<tr><td colspan=12 class=\"m-width td-border0\"><label name=\"D +sr_notes\" size=\"25\" class=\"font-large font-faceA\">DAILY SALES RE +PORT NOTES: &nbsp; &nbsp; <input type=\"text\" class=\"font-large fon +t-faceA\" name=\"Dsr_notes\" size=\"20\" value=\"$Dsr_notes\"></td>< +/tr>\n"; &get_yesterday; open(RPTDET, "<reports/amdsrdet.txt") or die "Cannot open amdsrdet.txt +"; flock RPTDET,2; seek(RPTDET,0,0); @rptdet = <RPTDET>; close(RPTDET); foreach $line (@rptdet) { $r_line = split(/\n/,$line); ($rpt_dt,$dsrd,$rpt_nts,$dsr_notes,$repcr_dt,$repcr_date,$rpt_cd,$ +rep,$sess_nbr,$session,$rpt_usr,$user,$tdy_pre_coh,$pre_coh,$td_sls_d +,$td_sls,$tot_exp_d,$tot_exp,$fin_coh_d,$fin_coh,$tdy_grpft_d,$tdy_gr +pft,$cash_xfr_desc,$cash_xfr_d,$cash_xfr_v,$tdy_cscnt_d,$tdy_custcnt, +$groc_d,$groc,$meats_desc,$meats_d,$meats_v,$fish_desc,$fish_d,$fish_ +v,$rice_d,$rice,$trans_d,$trans,$phwf_d,$phwf,$elec_d,$elec,$wtr_bill +_d,$wtr_bill,$loan_d,$loan,$pyrlA_desc,$pyrlA_d,$pyrlA_v,$van_desc,$v +an_d,$van_v,$legal2_desc,$legal2_d,$legal2_v,$legal3_desc,$legal3_d,$ +legal3_v,$misc1_desc,$misc1_d,$misc1_v,$misc2_desc,$misc2_d,$misc2_v) + = split(/\,/,$r_line); if($dsrd eq $yesterday) { $Lcoh = $pre_coh; }else { next; } } print "<tr><td colspan=12 class=\"l-width td-border0\"><label name=\"L +coh\" size=\"35\" class=\"font-large font-faceA\"> LAST CASH ON HAND: + </label></td>\n"; print "<td class=\"s-width td-border0 font-faceA font-large align-cent +er font-bold\" name=\"Lcoh\" type=\"text\" value=\"$Lcoh\" size=\"10\ +">$Lcoh</td></tr>\n"; print "<tr><td colspan=12 class=\"l-width td-border0\"><label name=\"P +re_coh\" size=\"35\" class=\"font-large font-faceA\"> CURRENT CASH ON + HAND: <font face=arial size=3><B>(Enter as 000.00)</B></font></label +></td>\n"; print "<td class=\"s-width td-border0\"><input name=\"Pre_coh\" type=\ +"text\" value=\"$Pre_coh\" size=\"10\" class=\"font-large align-right +\" /></td></tr>\n"; print "<tr><td colspan=12 class=\"f-width font-medium2 td-border0 font +-faceT font-red font-bold\">Enter \"Current Cash on Hand\" Amount or +you will have to start over!</td></tr>\n"; print "<P><tr><td colspan=12 class=\"l-width td-border0\"><label name= +\"User\" size=\"35\" class=\"font-large font-faceA\">REPORT WRITER:</ +label></td>\n"; print "<td class=\"s-width td-border0 font-faceA font-large align-cent +er font-bold\" name=\"User\" type=\"text\" value=\"$User\" size=\"10\ +">$User</td></tr></table>\n";
The $yesterday I am seeking will allow me to go back into data file and find what I need to provide for the report created by the table here. Thanks.

In reply to Re^4: The day before a specific date by jpys
in thread The day before a specific date by jpys

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.