Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

How to retrieve element in hash?

by MadDogSailor (Initiate)
on Nov 30, 2012 at 09:44 UTC ( #1006440=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $recref = $dbh->
        selectall_hashref("SELECT * FROM DSA_RECORD 
           WHERE file_name = '$file_name'", 'RECORD_NAME');
    die unless $recref;
    
  2. or download this
    .-> HASH(0x110916be8)
       'DATA' => HASH(0x110916a98)
    ...
          'RECORD_NAME' => 'DATA'
          'RECORD_SELECTOR' => '^1'
          'SECTION_NAME' => undef
    
  3. or download this
    $recname='DATA';
    $fieldsep = $recref->{$recname}->{'FIELD_DELIMITER'};
    
  4. or download this
    Use of uninitialized value in print .....
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1006440]
Approved by Ratazong
help
Chatterbox?
[Corion]: gnosti: I would cheat and use my approach instead of dealing with durations as objects, or a module
[Corion]: You could even do the calculation directly - my $duration = $H * 3600+ $M*60 + $S; strftime '%H:%M:%S', timelocal($duratio n)
[Corion]: (and that strftime call is largely superfluous too, converting back to H:M:S isn't hard either)

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (9)
As of 2017-08-18 09:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (297 votes). Check out past polls.

    Notices?