in reply to Delete the first line of a file ?

I'm not quite sure what you are asking, but I'll answer some questions that you might have been asking :)

Removing first and last line of a file:

use strict; open FILE, "</path/to/inputfile" or die "Blerch: $!\n"; # Set $/ to whatever your line terminating char is in inputfile my @lines=<FILE>; shift @lines; pop @lines; # @lines now contains the file contents without the first and last lin +es.

Removing leading # from a line:

$line=~s/^#//;

Inserting a leading # in a line:

$line=~s/^(.)/#$1/;
Note that the above code is untested however, and might do all kinds of funny stuff, not excluding actually working as intended.

CU
Robartes-