in reply to Script being caught up, somewhere. Causing infinite loop.

You are using a while loop, but you need a foreach loop. As it stands, @loop is always true, so your while loop never exits.

On another note, I think the way you are using (open|read|close)dir is also adding "." and ".." to @files, which probably isn't what you want. You might want to use something like:

@files = grep /\.inc$/, readdir(DIR);

UPDATE: enlil is just slightly quicker on the draw today, I guess. ;)

UPDATE AGAIN: Re: the response below. Careful now -- you very likely can open . and .., and you'll get very weird results.

- Matt Riffle

Replies are listed 'Best First'.
Re: Re: Script being caught up, somewhere. Causing infinite loop.
by Anonymous Monk on Feb 02, 2003 at 19:41 UTC
    Ah, see? Told ya i'd make a stupid mistake. Thank you very much. I can also do a
    open(FILE,"/home/kyleyankan/public_html/content/$file") || next;