Hello All
OK a few questions to help me understand. In my code below (as is familiar already) I have sections of the code that I have used, but I am really not quite sure what they do. I have played around with it and if someone could help me to understand better I would appreciate it.
I have buried my questions in the code below, removing all comments that were there already, that way my questions are clear. Thanks again for the help
Portree
use strict;
use warnings; #good!
use Win32::OLE;
use Date::Calc;
use diagnostics;
my %header_data;
my $f_mfg_desk = '//163.10.50.33/planning/logistics/programs/chicago_w
+ip_query2.txt';
my $f_mfg_desk2 = '//163.10.50.33/planning/logistics/programs/chicago_
+wip_query3.txt';
my ($sec, $min, $hour, $dayofmonth, $month, $year, $weekday, $day) = l
+ocaltime(time);
$month++;
$year += 1900;
open (INFILE, $f_mfg_desk);
($record);... or
while (<INFILE>)
{
chomp;
my @newrow = split /\t/;
# What does this below statement acutally mean?
$header_data{$newrow[2]} = [ $newrow[3..18] ];
}
close(INFILE);
open (OUTFILE, ">$f_mfg_desk2");
# If I am sorting by this data, why does it delelte most of # the data
+?
# Which data field is actually being used to sort?
for my $key (sort keys %header_data)
{
for my $a (@{$header_data{$key}})
{
print OUTFILE "$a\t";
}
print OUTFILE "\n";
}
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.