appending to a file

DBSMITH_at_OhioHealth.com
Date: 05/28/04


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



Relevant Pages

  • RE: appending to a file
    ... I looked through my Learning Perl book and only see ... code>>filename for appending to a file. ... writing to STDOUT designated as my file. ...
    (perl.beginners)
  • Re: Error 2471
    ... appending to a production table there is a way to check if Filename ... There must exist a table or query named "WOProduction". ... Dirk Goldgar, MS Access MVP ...
    (microsoft.public.access.formscoding)
  • RE: renaming a file
    ... > The numbers in the filename representing the date and then a ... The letters representing various filenames. ... > and appending a .txt to the end to make the format a little more ...
    (perl.beginners)
  • Re: random numbers in filenames
    ... is there anyway to prevent appending of a character on the excel filename? ... For some reason, Outlook ... > So it figures that it can't use that name again and appends a character to ...
    (microsoft.public.excel)
  • Re: Parse an xml file
    ... Of course I'm appending the filename at the end of the command, ... I an ksh script I need to get the value of a specified xml tag into a ...
    (comp.unix.shell)