Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: get the filename from CGI::UploadEasy

by doc_faustroll (Scribe)
on Apr 03, 2006 at 01:42 UTC ( #540834=note: print w/replies, xml ) Need Help??

in reply to get the filename from CGI::UploadEasy

You are in the land of a reference to a hash of hashes. If you are just learning the language and the idioms are unfamiliar to you, you might explicitly dereference first off to simplify

read perldoc perlref

my $ref = $ue->filinfo; my %HoH = %{$ref};
Then you have a hash or hashes which is a hash in which the keys are the filenames and the values are hash references.

the canonical print idiom from perldoc perdsc is: (although your taste may differ once you develop it):

foreach my $filename ( keys %HoH ) { print "$filename: { "; for my $key ( keys %{ $HoH{$filename} } ) { print "$key =$HoH{$filename}{$key} "; } print "}\n"; }

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://540834]
[stevieb]: been thinking... if it wasn't for Perl, I believe that I'd be done in tech. I don't do social media or the like, if I'm not coding I'm not on a device at all, and don't miss comms at all when I'm not around. I code for my job (which I like), but I think..

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2017-03-29 02:06 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (343 votes). Check out past polls.