Pam Derks wrote: > Hi all, > >
Hi Pam, I got stuck reading the code snippet you sent. > here's the code in question, and sample output below: > sub get_output{ > > @subdirs = readdir(DIR); > for $subdir(sort @subdirs){ > next if $subdir eq "." or $subdir eq ".."; > > #lets clean this up > $subdir =~ s/\.html//g; > $subdir =~ s/README//g; > $subdir =~ s/X//g; > $subdir =~ s/count//g; > $subdir =~ s/index//g; > $subdir =~ s/dir.shtml//g; > > open(FILE, "/dept/unxmkt/bin/hits/welcome/logs/total.$fname") or > die("no tally file: $!"); Right here. Following your indentation the for loop above should have finished, since the while loop starts unindented. Yet I see no closing brace. At this point, it becomes impossible, or more painful than it is worth, to try to follow the flow of execution. I would suggest that changing your standard indent to something more modest like four spaces would allow you to keep your indents properly nested.without drifting off-screen to the right. Particularly when you are dealing with looping issues, it is vital to get the formatting on your side. The compiler doesn't care, it ignores whitespace. It does make a great deal of difference in human comprehension. Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]