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:
I have not tried it and I don't like my splitting value but this might work?#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"; }
|
|---|