Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: How to print the 10 most recent (epoch) keys in a hash when epoch is not the key

by kevyt (Scribe)
on Nov 28, 2009 at 15:09 UTC ( [id://809898]=note: print w/replies, xml ) Need Help??


in reply to Re: How to print the 10 most recent (epoch) keys in a hash when epoch is not the key
in thread How to print the 10 most recent (epoch) keys in a hash when epoch is not the key

I thought about joining the 3 values into a string and then pushing them onto an array but I would need something to join/split the values that could never be found on a webpage. Example:

#To store the values $str = $epoch . "SpLiTvAlUe" . $url . ""SpLiTvAlUe" . $desc; # To print the values unshift (@array, $str); if (@array > 10){ pop(@array) } foreach (@array){ my ($epoch, $url, $desc)= split (/\"SpLiTvAlUe\"/); print $epoch . " " . $url . " " . $desc . "\n"; }
I have not tried it and I don't like my splitting value but this might work?
  • Comment on Re^2: How to print the 10 most recent (epoch) keys in a hash when epoch is not the key
  • Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2026-01-21 16:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (125 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.