[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



Put 'use diagnostics;' at the top of your code to get more info on errors.

Share the code and specific errors.  I suspect you're doing something like:

while () {
	$foo = $bar;
}

where you should have something like:

my ($foo, $bar);

while () {
	$foo = $bar;
}

> 
> 2-I also need to traverse a dir that itself contains dirs, processing
>  each file and dir. How do I traverse such a dir such that....when a
> dir is encountered it is entered and all the files in it are then
> processed, and if necessary drills down through other dirs [howto
> control depth ?]...before returning to the original dir that
> contained files and dirs ?

Perfect case for a recursive call.  Something along the lines of:

sub ParseDir
{

	my $filename = $_[0];

	if (-d $finename ) {
		ParseDir($filename);
	}
	.
	.
	.
}


-- 
Until later, Geoffrey


</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00529" href="msg00529.html">[ale] 2 Perl questions ?</a></strong>
<ul><li><em>From:</em> ccthomas at joimail.com (Courtney Thomas)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00533.html">[ale] 2 Perl questions ?</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00535.html">[ale] ISO image from a mounted CDROM</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00541.html">[ale] 2 Perl questions ?</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00530.html">[ale] 2 Perl questions ?</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00534"><strong>Date</strong></a></li>
<li><a href="threads.html#00534"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>