Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re: No output to screen or output file

by Riales (Hermit)
on Jul 24, 2012 at 17:15 UTC ( #983474=note: print w/replies, xml ) Need Help??

in reply to No output to screen or output file

Do you define $num_elements anywhere? I'm thinking you never enter the for loop because $num_elements is undefined.

Also, you appear to be using $c to iterate over $filter. This seems odd to me because $filter is just a string. Which array are you actually trying to iterate over?

Replies are listed 'Best First'.
Re^2: No output to screen or output file
by dkhalfe (Acolyte) on Jul 24, 2012 at 17:21 UTC

    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.

      $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.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://983474]
[Discipulus]: I miss a bit the sunny balconny of my previous flat.. but since june to september is better facing north
[Corion]: Discipulus: Yeah, I can see that reasoning :) But spending 5 minutes in the sun today quite improved my mood :)
[marto]: lazyweb Q: so an IE window apparently opened via JS with toolbars=no, all other IE instances closed. Click a URL in an email or whatever, and it doesn't open a new window or tab.
[marto]: does JS lock down windows created via to prevent this?

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2018-03-21 11:33 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (267 votes). Check out past polls.