mantra2006 has asked for the wisdom of the Perl Monks concerning the following question:
The above code is suppose to write valu, dist, tran and timestampmy $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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Writing to a File
by davidrw (Prior) on Aug 25, 2006 at 12:45 UTC | |
|
Re: Writing to a File
by holli (Abbot) on Aug 25, 2006 at 12:42 UTC | |
|
Re: Writing to a File
by Velaki (Chaplain) on Aug 25, 2006 at 12:43 UTC | |
|
Re: Writing to a File
by imp (Priest) on Aug 25, 2006 at 12:43 UTC | |
|
Re: Writing to a File
by mantra2006 (Hermit) on Aug 25, 2006 at 16:24 UTC | |
|
Re: Writing to a File
by mantra2006 (Hermit) on Aug 25, 2006 at 13:12 UTC | |
by RobPayne (Chaplain) on Aug 25, 2006 at 13:37 UTC | |
by perlfan (Parson) on Aug 25, 2006 at 14:19 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |