in reply to our + redo = ???

On line 33 your uninitialized variable was $new_kids. So I looked for that, and I had to wonder if you really meant to write:
sub interact() { print 'Current number of children is: ', "$children", '. i.e. thes +e:', "\n\n"; system('ps -ef | grep tryMore | grep -v grep'); print "\n\n"; print 'Minus one for the parent, of course', "\n\n"; print 'How many children do you want to add? [1]: '; my $new_kids = <>; # ^^ (Your mistake?) chomp $new_kids; $new_kids = '0' unless $new_kids; unless($new_kids) { $children += 1; } else { $children += $new_kid +s; } return; }

UPDATE
In response to the note below. Experience consists of recognizing a mistake the second time we make it. *Learning* is when you can recognize that someone else is making the mistake. When I can answer questions fast, it usually is a good sign that I have spent an hour or more making that very mistake in my own code...

Replies are listed 'Best First'.
(jptxs) Re (tilly) 1: our + redo = ???
by jptxs (Curate) on Apr 01, 2001 at 08:45 UTC
    I am SUCH a dumb-ass. thank you =)

    UPDATE someone asked in the CB why I was using redo to exit a for loop. Just to clarify, it's because this is just a prototype for a larger program and that will not do this. I know it's bad form and figured I should note that here so not to set a bad example =) (as if I already didn't do that with such a dumb-ass mistake...)

    oh, and thanks for the kind words tilly; though, i must say that it's hard to picture you making this mistake in particular =)

    "A man's maturity -- consists in having found again the seriousness one had as a child, at play." --Nietzsche
Re: Re (tilly) 1: our + redo = ???
by MeowChow (Vicar) on Apr 02, 2001 at 07:05 UTC
    /me fumbles to make a painful "New Kids on the Block" pun out of this thread:
    • Is this an instance of "New Kids on the Enclosing Block"? (hmm... no)
    • Out with it, tilly, we know you're a closet New Kids on the Block fan (ad hominem, inciteful hate-speech... next)
    • Duh, they're called "New Kids on the Block", not "New Kids in the Block"! (might be a keeper)
    • Now that's my New Kids on the Block. (being an Abbot was nice while it lasted)
    • Like I've always said, the New Kids on the Block have no value. (ding!)
    • Ah, screw it...
       MeowChow                                   
                   s aamecha.s a..a\u$&owag.print
      Were I a fan of new kids on the block, would I have zeroed in on that as the error so fast?

      Well you said you wanted a painful pun...

        It just goes to show that you've got The Right Stuff.