in reply to write to file in append mode

And just to be different, try this:

#!/usr/bin/perl -wT use strict; use Tie::File; my @ry; tie @ry,"Tie::File","myfile.txt" or die $!; push @ry,"stuff"; untie @ry; exit(0);

In Perl there is always more than one solution to a problem.... and nobody expects the Perl Inquisition!

update: fixed minor typo pointed out by Happy-the-monk


Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg