Hi,
Pablo, you should write this at line of IF command:
        if($count>0 && $count<$#archivo) {
I hope you get the right thing you want.
Bye,
Josimar


----- Original Message ----- 
From: "Pablo Fischer" <[EMAIL PROTECTED]>
To: "Perl Beginners" <[EMAIL PROTECTED]>
Sent: Wednesday, July 30, 2003 4:48 PM
Subject: Printing an Array


> Hi!
>
> I have an array (@archivo), and each line has pipes (|), so Im using
split,
> but Im using 'sleep 1' to make it 'slower' so I can see line by line.
>
> foreach $i (@archivo) {
>     #Dont count the first and last line
>     if($count>$size || $count<$size) {
> chomp($i);
> ($correo, $clave, $nombre, $registro, $id, $sexo, $password) = split(/\|/,
> $i);
> print $correo;
> sleep 1;
>     }
>     $count++;
> }
>
> However, it DOESNT print the array, it just waits.. (cause its no printing
> nothing). However I found that removing the sleep it prints, or after
print
> $correo add print " "; and it prints!
>
> Why sleep its ?")#$)"$ my foreach? :-(
>
> What it prints without sleep or with the other 'print' is:
>
> [EMAIL PROTECTED]@[EMAIL PROTECTED]@domain4.com
>
> and ...
>
> thanks!
> Pablo
> -- 
> Pablo Fischer Sandoval ([EMAIL PROTECTED])
> http://www.pablo.com.mx
> http://www.debianmexico.org
> GPG FingerTip: 3D49 4CB8 8951 F2CA 8131  AF7C D1B9 1FB9 6B11 810C
> Firma URL: http://www.pablo.com.mx/firmagpg.txt
>
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



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

Reply via email to