Re: Extracting Directories and Sub Directories and Counting
From: Ron Smith (geeksatlarge_at_yahoo.com)
Date: 11/04/04
- Previous message: John W. Krahn: "Re: Mass Editing 125 files"
- Maybe in reply to: Ron Smith: "Re: Extracting Directories and Sub Directories and Counting"
- Next in thread: Harold Castro: "Client-server with perl?(need some useful progs for squid proxy)"
- Reply: Harold Castro: "Client-server with perl?(need some useful progs for squid proxy)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 3 Nov 2004 20:08:30 -0800 (PST) To: Perl_beginners <beginners@perl.org>
--- Gunnar Hjalmarsson <noreply@gunnar.cc> wrote:
> Ron Smith wrote:
> > If I wanted to add more fields to my output, which
> construct would I
> > use to create more fields; something like the
> following?
> >
> > basename count extension size
> >
> > ...maybe 'HoH', or just expand on the 'HoA?
>
> I suppose that you are not really talking about the
> output now, but
> rather about adding more info to the data structure.
> Anyway, it depends
> on what you would like to use it for. I imagine that
> you might want a
> HoAoH with each file being represented by a hash
> reference. Something
> like:
>
> my %HoAoH = (
> dir1 => [
> {
> basename => 'name1',
> extension => 'html',
> size => 1000,
> },
> ],
> dir2 => [
> {
> basename => 'name2',
> extension => 'html',
> size => 2000,
> },
> {
> basename => 'name3',
> extension => 'gif',
> size => 1500,
> },
> ],
> );
>
> --
> Gunnar Hjalmarsson
> Email: http://www.gunnar.cc/cgi-bin/contact.pl
>
This looks closer to what I was refering to. But I
didn't even know you could do this. I've been away
from this thread a couple of days mulling over
'perlref' and 'perlreftut'.
I've also picked up a copy of "Learning Perl Objects,
References & Modules". Hey, I just recently discovered
this book was out there. I think I'd better go through
this material and what you've given me above, before I
proceed any futher with this thread.
Thanks, everybody, for your help; and especially
Gunnar. I'll be back with other questions regarding
references after I've done further homework. :)
Ron
__________________________________
Do you Yahoo!?
Check out the new Yahoo! Front Page.
www.yahoo.com
- Previous message: John W. Krahn: "Re: Mass Editing 125 files"
- Maybe in reply to: Ron Smith: "Re: Extracting Directories and Sub Directories and Counting"
- Next in thread: Harold Castro: "Client-server with perl?(need some useful progs for squid proxy)"
- Reply: Harold Castro: "Client-server with perl?(need some useful progs for squid proxy)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|