Problem with recursive routine

2011-11-28 Thread Barry Brevik
I'm having a problem with a recursive routine that enumerates a directory tree and all of its files. It works well, except when it goes down 1 level from the top directory, I get this message: Use of uninitialized value in addition (+) at test61.pl line 61. I've been fighting this thing for a

RE: Problem with recursive routine

2011-11-28 Thread Tobias Hoellrich
You are not changing the directory while traversing. Whenever you access $nxtfile, you'll need to access it as $targetdir/$nxtfile. So, this (among other things): $fileTotalSize += (-s $nxtfile);# THIS IS LINE 61 REFERRED TO IN THE ERROR MSG. Needs to become: $fileTotalSize

RE: Problem with recursive routine

2011-11-28 Thread Barry Brevik
Thanks. That is a cool observation. -Original Message- From: Tobias Hoellrich [mailto:thoel...@adobe.com] Sent: Monday, November 28, 2011 3:47 PM To: Barry Brevik; perl Win32-users Subject: RE: Problem with recursive routine You are not changing the directory while traversing. Whenever