http://www.perlmonks.org?node_id=983476


in reply to Re: No output to screen or output file
in thread No output to screen or output file

Yes I do

 my $num_elements = (@filter-1); #Number of elements in array

I have even printed the $num_elements variable to the screen and it works.

Replies are listed 'Best First'.
Re^3: No output to screen or output file
by Cristoforo (Curate) on Jul 24, 2012 at 18:32 UTC
    $num_elements isn't really named correctly. In the code, it is the last index of the array. Just a minor nit.   :-)

    But, your for loop is ok because it tests if $c <= $num_elements.

    Chris