Diego Aguirre wrote:
>
> Hello,
Hello,
> I have just learned opening and reading a file, with
>
> open (HoyIn,"File.txt");
What would happen if for some reason the file could not be opened? You
should ALWAYS verify that the file opened correctly.
> @rgstr=<HoyIn>;
> foreach $linea (@rgstr)
> {
> print $linea ;
> }
> close (HoyIn);
>
> I want read the file from -lets say- the fifth line on. Any help, pls?
open HoyIn, 'File.txt' or die "Cannot open 'File.txt' $!";
while ( <HoyIn> ) {
if ( 5 .. eof ) {
print;
}
}
__END__
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]