I'm trying to read the last line on a Plain text File.

But when I use:

    open (DATOS, "$bd") || die "Error: no se puede abrir el archivo";
    while
ATOS>){ 
    $registro = <DATOS>; 
    }

I don't get any value on $registro

I need to insert   ----    $inicio = <DATOS>;  ------

This way to get the the last line of my file in $registro:

    open (DATOS, "$bd") || die "Error: no se puede abrir el archivo";
    $inicio = <DATOS>;
    while (<DATOS>){ 
    $registro = <DATOS>; 


It sounds weird for me. But maybe I'm missing something. I mean, the script works at 
last, but I'd like better to have one line of code less.

Can anyone help me????



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to