On Mon, 14 Nov 2011 23:06:15 -0600
Chris Stinemetz wrote:
> Thank you Shlomi.
>
> For some reason my final value for the keys is being repeated 24 times so I
> am guessing I have an issue with how I am iterating over the hashes.
>
> I can't seem to find the correct way to fix it so the value di
Thank you Shlomi.
For some reason my final value for the keys is being repeated 24 times so I
am guessing I have an issue with how I am iterating over the hashes.
I can't seem to find the correct way to fix it so the value displays once.
Any help is greatly appreciated.
An example of the output
Hi Chris,
On Mon, 14 Nov 2011 00:31:19 -0600
Chris Stinemetz wrote:
[SNIP]
> # header
> print "HOUR\tCELL\tHEH_TYPE\tHEH_COUNT\n";
> # body
> foreach my $hour (sort {$a <=> $b} keys %CELL){
> foreach my $cellNo (sort {$a <=> $b} keys %{$CELL{$hour}}) {
> print "$hour\t $cellNo\t";
> f
How can I iterate over this three level hash printing the results as
Hour\tCell\tHEH_Type\HEH_Count
$VAR1 = {
'00' => {
'875' => {
'CDM 1, CCU 1, CE 5' => '1'
},
'13' => {
At 7:37 AM -0600 11/6/11, Chris Stinemetz wrote:
I would like to join the key from %cell hash to %cbr hash
the dump from %cell hash looks like:
'65' => {
'CDM 1, 2, CBR 3, 15MHz' => 2
},
%cell is a two-level hash with two keys needed to get to
Hi Chris,
On Sun, 6 Nov 2011 07:37:26 -0600
Chris Stinemetz wrote:
> I would like to join the key from %cell hash to %cbr hash
>
> the dump from %cell hash looks like:
>
> '65' => {
> 'CDM 1, 2, CBR 3, 15MHz' => 2
> },
> and the dump from %cbr lo
I would like to join the key from %cell hash to %cbr hash
the dump from %cell hash looks like:
'65' => {
'CDM 1, 2, CBR 3, 15MHz' => 2
},
and the dump from %cbr looks like:
$VAR1 = {
'1' => 223,
};
So that %cbr becomes:
'65'=>{
[EMAIL PROTECTED] [m], on Monday, January 10, 2005 at 13:23
(-0500) made these points:
mon> I can try, I personaly perfer RoHoH..., looks like you have RoHoAoH
thanks, maybe I will change that to RoHoH, I'd like to insert those values
to database, where keys will be name of columns.
--
...m8s
Ing. Branislav Gerzo wrote:
Hi pals,
Hello,
How can I add values to hash, when key is the same ? Example:
my %ha = ( 'test1' => [
{
'test1_a' => 'a',
'test1_b' => 'b',
},
{
- Original Message -
From: <[EMAIL PROTECTED]>
Newsgroups: perl.beginners
To: "Chris Charley" <[EMAIL PROTECTED]>
Cc:
Sent: Monday, January 10, 2005 1:23 PM
Subject: Re: complex data structure
- Original Message -
From: Chris Charley <[EMAIL PROTECTE
- Original Message -
From: Chris Charley <[EMAIL PROTECTED]>
Date: Monday, January 10, 2005 12:59 pm
Subject: Re: complex data structure
> I hope someone can explain this related question. When I run the
> code below
I can try, I personaly perfer RoHoH..., looks like you
I hope someone can explain this related question. When I run the code below
on Brano's data structure, 'each' gives me false results but 'keys' gives me
correct results. I'm kind of stumped!
#!/usr/bin/perl
use strict;
use warnings;
my $hash = {
'test1' => [
{
Moon, John [MJ], on Monday, January 10, 2005 at 07:31 (-0500) made
these points:
MJ> Hope this helps ..
thanks a lot for your time, I appreciate that!
--
...m8s, cu l8r, Brano.
[Rifles don't pick up the phone in the middle of a down load]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
Ing. Branislav Gerzo [IBG], on Monday, January 10, 2005 at 13:03
(+0100) thinks about:
IBG> How can I add values to hash, when key is the same ? Example:
I am answering to myself:
writing own code should be complex, why not to use module for that?
try a look at:
http://search.cpan.org/~mneylon/H
Subject: complex data structure
Hi pals,
How can I add values to hash, when key is the same ? Example:
my %ha = ( 'test1' => [
{
'test1_a' => 'a',
Hi pals,
How can I add values to hash, when key is the same ? Example:
my %ha = ( 'test1' => [
{
'test1_a' => 'a',
'test1_b' => 'b',
},
{
'test1_a
Rob Richardson wrote:
>
> Hello again.
Hello,
> None of this is working.
>
> John Krahn suggested:
> > push @{$trainsList{$trainDate}}, @trainData;
> (note the curly brackets on the outside). This gave me the following
> error:
>
> Can't locate object method "trainList" via package "train
Hello again.
None of this is working.
John Krahn suggested:
> push @{$trainsList{$trainDate}}, @trainData;
(note the curly brackets on the outside). This gave me the following
error:
Can't locate object method "trainList" via package "trainDate" (perhaps
you forgot to load "trainDate"?) at
Rob Richardson wrote:
>
> Greetings!
Hello,
> I am trying to write a Perl script for the Cuyahoga Valley Scenic
> Railroad, so that volunteers can sign up to work on trains. The
> schedule file has comma-separated lines that have the date of the
> train, the name of the train, and the names of
sed by a complex data structure
Greetings!
I am trying to write a Perl script for the Cuyahoga Valley Scenic
Railroad, so that volunteers can sign up to work on trains. The
schedule file has comma-separated lines that have the date of the
train, the name of the train, and the names of people
Greetings!
I am trying to write a Perl script for the Cuyahoga Valley Scenic
Railroad, so that volunteers can sign up to work on trains. The
schedule file has comma-separated lines that have the date of the
train, the name of the train, and the names of people who will be
working on the train (or
> -Original Message-
> From: John W. Brooking IV [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 26, 2001 10:16 AM
> To: [EMAIL PROTECTED]
> Subject: Syntax problems with complex data structure
>
>
> Readers,
>
> I hope you all have had or are ha
Readers,
I hope you all have had or are having happy holidays of your tradition.
I'm trying to build up a complex data structure from a file, and cannot
figure out the right syntax for accessing it afterwards. O'Reilly's
"Programming Perl" has been very helpful in s
23 matches
Mail list logo