appending to a file
DBSMITH_at_OhioHealth.com
Date: 05/28/04
- Next message: Tim Johnson: "RE: appending to a file"
- Previous message: DBSMITH_at_OhioHealth.com: "inserting text, with a rename"
- Next in thread: Tim Johnson: "RE: appending to a file"
- Maybe reply: Tim Johnson: "RE: appending to a file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: beginners@perl.org Date: Thu, 27 May 2004 18:29:00 -0400
more help please! I looked through my Learning Perl book and only see
code >>filename for appending to a file. Here is my code but it is not
writing to STDOUT designated as my file.
my $foreigntapes="/usr/local/log/foreign_tapes.log";
delete $ENV{'IFS'};
local $ENV{'PATH'} =
"/usr/epoch/bin:/usr/epoch/EB/bin:/usr/bin:/usr/sbin:/bin:/sbin";
#print $ENV{'PATH'},"\n";
## Traverse through array
my @ftapes = ();
my @ftapes = grep s/^barcode=//, `evmvol -w label_state=3` >>$foreigntapes;
if ( -s $foreigntapes ) {
`echo "foreign tapes found, labeling foreign tapes"|mail -s
"foreign tapes" support`
foreach $_ (@ftapes) {
`evmlabel -l st_9840_acs_0 -t 9840S -b$_`
}
}
the appending is not working!!!
again the output is just a listing of tapes
...
......
E00413
E00412
E00431
thank you!
derek
- Next message: Tim Johnson: "RE: appending to a file"
- Previous message: DBSMITH_at_OhioHealth.com: "inserting text, with a rename"
- Next in thread: Tim Johnson: "RE: appending to a file"
- Maybe reply: Tim Johnson: "RE: appending to a file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|