in reply to Re^2: Replacing, cutting, deleting lines in the file
in thread Replacing, cutting, deleting lines in the file

Is this what you want?
use strict; use warnings; use Data::Dumper; my @file = (<DATA>); my @array = @file; splice @array, 0, 1,'something'; print Dumper \@array; __DATA__ line 1 line 2 fsefse line 3 line 4 ,... line 5 line 6>

Replies are listed 'Best First'.
Re^4: Replacing, cutting, deleting lines in the file
by Jarek (Novice) on Nov 25, 2009 at 09:08 UTC
    Yes, Thank you. Can you explain me why you had to put two parameters 0, 1 to replace only the first element ? OK... :) I know why... thank you :) Regards, Jarek