in reply to Recursive Subroutin Problem

Your most likely bug is that
my $medio=($izquierda+$derecha)<<2;
should be
my $medio=($izquierda+$derecha) >> 1; # divide by 2

        "You're only given one little spark of madness. You mustn't lose it."         - Robin Williams

Replies are listed 'Best First'.
Re^2: Recursive Subroutin Problem
by Panfi96 (Initiate) on Dec 01, 2014 at 22:43 UTC

    Oh! You're right! that was all the problem! Thanks! :D