Gunnar Hjalmarsson wrote:
Dermot wrote:
<snip>
This will only give you the top level of directories:
07/02/2009 14:00 <DIR> .
07/02/2009 14:00 <DIR> ..
07/02/2009 14:00 <DIR> bin
15/03/2006 22:14 <DIR> eg
07/02/2009 14:00 <DIR> html
15/03/2006 22:15 <DIR> lib
27/04/2005 21:32 <DIR> site
A better solution would show you all the sub-directories. Something to
think about.
How about:
C:\home>type test.pl
my ($bytes) = qx(dir /s C:\\IndigoPerl\\perl)
=~ /.+File\(s\)\s+(.+?)\s+bytes/s;
$bytes =~ tr/0-9//cd;
Better written as:
my ($bytes) = qx(dir /s /-c C:\\IndigoPerl\\perl)
=~ /.+File\(s\)\s+(\d+)/s;
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/