Home > Archive > PERL Beginners > March 2005 > printing a filehandle to another file.
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
printing a filehandle to another file.
|
|
| DBSMITH@OhioHealth.com 2005-03-23, 8:55 pm |
| Here is my code:
use strict; use warnings;
my $tpexports = qq(/usr/local/bin/ohiohealth/derek);
my $archivedexports = qq(/usr/local/log/9940exports.archived);
open (FFFF_, "+>$tpexports") || die "could not open file:
$tpexports $!";
open (FOO, ">>$archivedexports") || die "could not open
file $!";
print FOO "\n", $tpexports;
close FFFF_;
close FOO;
My goal is to append whats in derek to FOO.
or
print "\n" >> derek ; cat derek >> 9940exports.archived;
thank you,
derek
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
| |
| DBSMITH@OhioHealth.com 2005-03-23, 8:55 pm |
| Perl'ers.... nevermind... I had a brain fart. I got it using a foreach
loop on the file.
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
Derek
Smith/Staff/OhioH
ealth To
<beginners@perl.org>
03/23/2005 04:52 cc
PM
Subject
printing a filehandle to another
file.
Here is my code:
use strict; use warnings;
my $tpexports = qq(/usr/local/bin/ohiohealth/derek);
my $archivedexports = qq(/usr/local/log/9940exports.archived);
open (FFFF_, "+>$tpexports") || die "could not open file:
$tpexports $!";
open (FOO, ">>$archivedexports") || die "could not open
file $!";
print FOO "\n", $tpexports;
close FFFF_;
close FOO;
My goal is to append whats in derek to FOO.
or
print "\n" >> derek ; cat derek >> 9940exports.archived;
thank you,
derek
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
|
|
|
|
|