perl script to add a line into a file

hi all

need a perl script to add a line into a file

thanks with anticipation

You have to tell us more than that...

Otherwise...

perl -e 'print "this is a line to add to a file"' >> filename

would append a line just as

echo "this is a line" >> filename would do the same!

Or in Perl

open (F, ">>file") || die "Could not open file: $!\n";
print F "another line\n";
close F;

This is more a function of the "append mode" of the operating system's open function than of Perl, but perhaps this is what you were looking for.