10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi, I have a hash of hash where it has
name, activities and count
i have data like this -
$result->{$name}->{$activities} = $value;
content of that are -
name - robert tom cat peter
activities - running, eating, sleeping , drinking, work
i need to print output as below
... (3 Replies)
Discussion started by: asak
3 Replies
2. Programming
I was looking at this script and was wondering if anyone can explain what this script does and how does it work. Thank you for any help.
State* lookup(char* prefix, int create)
{
int i, h;
State *sp = NULL ;
h = hash(prefix);
for (sp = statetab; sp != NULL; sp... (14 Replies)
Discussion started by: totoro125
14 Replies
3. Shell Programming and Scripting
hello,
i am new to scripting and would like to know how to return a hash table from a sub routine.
i tried the following,
my %hash_function = ();
hash_function = &return_hash();
sub return_hash
{
my %hash = ();
///populate the hash
return %hash;
}
but it dosent seem to... (1 Reply)
Discussion started by: hemalathak10
1 Replies
4. Shell Programming and Scripting
Hi,
I have an hashes of hash, where hash is dynamic, it can be n number of hash. i need to compare data_count values of all .
my %result (
$abc => {
'data_count' => '10',
'ID' => 'ABC122',
}
$def => {
'data_count' => '20',
'ID' => 'defASe',
... (1 Reply)
Discussion started by: asak
1 Replies
5. Programming
Hi,
I hope someone can help me with the following prob..
I need to implement a hashtable whose KEYs are strings and VLAUEs are
again hashtables.
ie key - is a string and value -is another hashtable .
So.... how am I supposed to be implementing my nested hashtable?
Thanks in advance (1 Reply)
Discussion started by: andrew.paul
1 Replies
6. Shell Programming and Scripting
Hi,
In Perl, is it possible to use a range of numbers with '..' as a key in a hash?
Something in like:
%hash = (
'768..1536' => '1G',
'1537..2560' => '2G'
);
That is, the range operation is evaluated, and all members of the range are... (3 Replies)
Discussion started by: dsw
3 Replies
7. Shell Programming and Scripting
Can Someone explain me why even using Tie::IxHash I can not get the output data in the same order that it was inserted? See code below.
#!/usr/bin/perl
use warnings;
use Tie::IxHash;
use strict;
tie (my %programs, "Tie::IxHash");
while (my $line = <DATA>) {
chomp $line;
my(... (1 Reply)
Discussion started by: jgfcoimbra
1 Replies
8. Shell Programming and Scripting
Hey guys,
I'm not the best AIX scripter about but I can flounder my way thru them to create what I need.
Anyhow, I have various scripts that perform various actions and processes. I was tasked to come up with a single form of logging that all the scripts could implement so that the output... (2 Replies)
Discussion started by: isawme
2 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I have a nested hash table say for example as follows:
%coins =
(
1 => {
"Quarter"=>25,
"Dime"=>10,
"Nickel"=>5,
},
2 => {
"asd"=>34,
"qwe"=>45,
... (0 Replies)
Discussion started by: arthi
0 Replies
10. Programming
Dear Friends,
I want to create a hash table using the standard Glib header (if possible) so that I can store a structure and keep the hash key(search key) based on a string.
Any example code would be great since I am not able to get the main idea.
best regards
Skull (4 Replies)
Discussion started by: callmetheskull
4 Replies