Hello Monks
I am struck up in a strange situation and got to be resolved asap...wondering where the problem is...
my $busnDate;
my $valuFileName="ABCD_060824010101.DAT";
my $distFileName="EFGH_060824010101.DAT";
my $tranFileName="HIJK_060824010101.DAT";
my $tmp_file="C:\\temp\\testtmp.tmp";
$busnDate = substr($valuFileName, index($valuFileName, '_')+1, 12);
print $busnDate;
# store file names - order should be BUSINESS_DATE VALU DIST TRAN
print "\nStoring file names in file $tmp_file: ";
open(TMP_FILE, "> $tmp_file") or die "failed\n";
print "SUCCESS\n";
print TMP_FILE $valuFileName . "\n";
print TMP_FILE $distFileName . "\n";
print TMP_FILE $tranFileName . "\n";
print TMP_FILE $busnDate;
close TMP_FILE;
The above code is suppose to write valu, dist, tran and timestamp
...but surprisingly only valu, dist, tran is written into file and not time
Can anybody tell me how to makesure it writes timestamp
its critical and thanks for the help
Sridhar
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.