in reply to Break Array loop

Hello snehit.ar

i dunno if I understood it but:

for my $i (0 .. $#records) { # check here sleep (10) if $i == 11; $records[$i]->{line} = $i + 1; # print HERE not outside the loop }

You basically check if you are processing the 11th element and sleep.

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.