Hi Jane, ----- Original Message ----- From: Ryan Thomas Sent: 21.04.2004, 12:18 Uhr
>Hello All > >I have a script below that lists a directory tree structure (thanks for the base >code Jan!)and have modified it, unsuccessfully, to add the file size. > >What have i done wrong ?? > >The output I am looking for is: > >c:\anydir\foo.txt 1,102 > >code: > ># Reads a directory tree and parses the results > ># use strict; >use File::Find; >use File::stat; >use Cwd; You should not comment 'use strict;' which will force you to use good programming style. Apart from that, your script works for me. If you want the output mentioned above, though, you would have to write (printf formatting left out): >find ( sub { print qq{$File::Find::name }; >$size=(stat($File::Find::name))[7]; >print $size; } What error messages do you get? - Jan -- There's no place like ~/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>