in reply to Re^2: Filehandle opened only for output error
in thread Filehandle opened only for output error

well then probably something else is wrong. could you show us a wider context in which this function is used. here is an example that refers to your 'problem' but with a working procedure.
use strict; use Data::Dumper; open(FILE, "<", "file.in") || die "Error in : $!"; my @array = <FILE>; close FILE; print Dumper(\@array); file.in here i am , where are you, i am here and you also here
cheers

PS

try dumping the @lineas to check if the data is in the array. if it is then surely the problem is somewhere else.

use Data::Dumper; sub Take_Txt{ my $archivo = shift; open my $ARCHIVO, '>', $archivo or die $!; my @lineas = <$ARCHIVO>; close $ARCHIVO; shift(@lineas); die Dumper(\@lineas); return @lineas; }