Re: Extracting Directories and Sub Directories and Counting

From: Ron Smith (geeksatlarge_at_yahoo.com)
Date: 11/04/04

  • Next message: Roime bin Puniran: "MySQL+foreach loop.........roy"
    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
     


  • Next message: Roime bin Puniran: "MySQL+foreach loop.........roy"

    Relevant Pages

    • Re: flushserv.exe
      ... If you're already searched the 'net for references, ... have any information in the resource section of the ... > against HTML email X ... Send instant messages & get email alerts with Yahoo! ...
      (Focus-Microsoft)
    • Re: [Full-Disclosure] [argv] PHC Threatcon Monitor & Hacklog Vulnerable
      ... Workaround: ... References: ... Do you Yahoo!? ... Charter: http://lists.netsys.com/full-disclosure-charter.html ...
      (Full-Disclosure)
    • PAPAJOHN
      ... Please remove all references to my site from your. ... Yahoo ID Movie_Maker_The_Kellys ... obtained by publishing in any format other peoples work ...
      (microsoft.public.windowsxp.moviemaker)
    • Re: Taking a reference to a calculated value
      ... See perlref for detailed information, ... intro to references. ... so it's best to avoid them. ...
      (comp.lang.perl.misc)
    • hard references/arrays
      ... use diagnostics; ... This doesn't compile of course and outputs: ... So I looked up hard references in perlref, but couldn't see how it applied ...
      (comp.lang.perl.misc)