It looks like it is a scoping issue. Add the line
print $@ if $@; after the
eval to show if it
eval'ed correctly and you will see that the
eval does not know about
$i once you move it's declaration to after
sub makeLazy.
I hope this is helpful.
Cheers,
JohnGG