Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: delimited strings into a hash of hashes

by ikegami (Patriarch)
on Sep 02, 2005 at 08:01 UTC ( [id://488571]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    foreach my $file (@filenames) {
       my $h = \%files;
    ...
    
       $h->{$last} = 1;
    }
    
  2. or download this
    foreach my $file (@filenames) {
       my $p = \\%files;
    ...
       $p = \(${$p}->{$_}) foreach @parts;
       ${$p} = 1;
    }
    
  3. or download this
    foreach (@filenames) {
       my $p = \\%files;
       $p = \(${$p}->{$_}) foreach split /[-_.]/;
       ${$p} = 1;
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://488571]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (7)
As of 2024-04-19 08:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found