Oh,sorry to bother again, but I did what u said, and it doesnt show anything although I have gave it parameters('mon.txt') after finishing the subroutine,but it doesnt show me anything(I have checked that it does have something).Any suggestions?I have a few suggestions.
Be more specific with the problem you are having. Show your updated code. Show (a small) sample of your input file. If you expect the code to produce some output, show us what you get, and show us what you expect.
Does @lineas contain what you expect it to? Prove it by printing it with Data::Dumper:
use Data::Dumper; sub Take_Txt{ my $archivo = shift; open my $ARCHIVO, '>', $archivo or die $!; my @lineas = <$ARCHIVO>; print Data::Dumper(\@lineas); close $ARCHIVO; shift(@lineas); return @lineas; }
This advice, and other tips, is available in the Basic debugging checklist.
Read this: How do I compose an effective node title?. A better node title might be 'Filehandle open for output error'
In reply to Re: Filehandle opened only for output error
by toolic
in thread Filehandle opened only for output error
by Sismetic
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |