in reply to Re: Recursion
in thread Recursion

next if $dir_cont =~s/^\.\.?$/;
you might want to change that line to:
next if $dir_cont=~/^\.\.?$/;
because I really don't think you want substitution. basically delete the 's' also
my($dir,$fullpath) = @_;
should be
my($dir,$full_path) = @_;