> "PP" == Philip Potter writes:
PP> 2009/11/11 Uri Guttman :
>> you can also simplify the copy a little with a hash ref:
>>
>> my $readfsgs_flags = { map { $_ => $flags->{$_} } @flags_to_copy } ;
PP> Is this really simpler than my version?
PP> @readfsgs_fla...@flags_to_copy} =
2009/11/11 Uri Guttman :
>> "PP" == Philip Potter writes:
>
> PP> my %readfsgs_flags;
> PP> my @flags_to_copy = qw(limit); # can scale up by adding more hash
> keys here
> PP> @readfsgs_fla...@flags_to_copy} = @{$flag...@flags_to_copy};
> PP> my @results = readfsgs($testfi
> "PP" == Philip Potter writes:
PP> my %readfsgs_flags;
PP> my @flags_to_copy = qw(limit); # can scale up by adding more hash
keys here
PP> @readfsgs_fla...@flags_to_copy} = @{$flag...@flags_to_copy};
PP> my @results = readfsgs($testfilename, \%readfsgs_flags);
PP>
Paul Lalli wrote:
On Jun 12, 12:15 am, [EMAIL PROTECTED] (Beast) wrote:
Why this following code has not working as expected?
print "Number of element(s) : " . sprintf("%10d", keys(%hash) ) . "\n";
The keys() function does two different things, depending on context.
In scalar context, it
On Jun 12, 12:15 am, [EMAIL PROTECTED] (Beast) wrote:
> Why this following code has not working as expected?
>
> print "Number of element(s) : " . sprintf("%10d", keys(%hash) ) . "\n";
The keys() function does two different things, depending on context.
In scalar context, it returns the numb
beast wrote:
> Hi All,
>
>
> Why this following code has not working as expected?
>
> print "Number of element(s) : " . sprintf("%10d", keys(%hash) ) . "\n";
keys(%hash) returns the hash keys as a list, so
sprintf("%10d", keys(%hash) )
is like
sprintf("%10d", 'key3', 'key4', 'key1',
On Thu, Jun 12, 2008 at 12:15 AM, beast <[EMAIL PROTECTED]> wrote:
> Hi All,
>
>
> Why this following code has not working as expected?
>
>print "Number of element(s) : " . sprintf("%10d", keys(%hash) ) . "\n";
>
Try: print "Number of element(s): " . sprintf("%10d", scalar keys(%h)),"\n";
>
On 5/2/06, Rance Hall <[EMAIL PROTECTED]> wrote:
the set of hash keys is what the computer uses to find values in the
hash, and in order to optimize your code and make searching the hash for
specific values as fast as possible, you should WANT your key to be as
short and simple as possible but s
Ryan Perry wrote:
Generally, your hash value is larger than you key ( $hash{key}="Some
text, maybe a sentence or two"). Is there any reason I should not
reverse this relationship? ($hash{"Some text, maybe a sentence or
two"}='key')
Thanks!
the set of hash keys is what the com
Ryan Perry wrote:
> Generally, your hash value is larger than you key ( $hash{key}="Some
> text, maybe a sentence or two"). Is there any reason I should not
> reverse this relationship? ($hash{"Some text, maybe a sentence or
> two"}='key')
The only rules are that hash keys are converte
On 5/1/06, Ryan Perry <[EMAIL PROTECTED]> wrote:
Generally, your hash value is larger than you key ( $hash{key}="Some
text, maybe a sentence or two"). Is there any reason I should
not reverse this relationship? ($hash{"Some text, maybe a sentence or
two"}='key')
There's no law against
>Generally, your hash value is larger than you key ( $hash{key}="Some
>text, maybe a sentence or two"). Is there any reason I should
>not reverse this relationship? ($hash{"Some text, maybe a sentence or
>two"}='key')
There is not such rule for comparing Key and Value's size.
For e
There are a couple of kludgy ways to do this, but any time you find
yourself wanting to do this you have to stop and make sure that what you
are attempting is really what you want to have happen. 99% of the time
what you really want is an array.
-Original Message-
From: Causevic, Dzena
On Thu, Dec 22, 2005 at 05:18:35PM -0500, Causevic, Dzenan wrote:
> I am trying to print HASH keys in exact order as they are defined, but
> "keys %HASH" returns them in a random order, "sort" is not going to
> work either because keys are strings that are not defined in the exact
> alphabetical o
use utf8;
# Perl pragma to enable/disable UTF-8 in source code
and save as utf8 format.
see
"Martin Pfeffer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> hi to all
> Does anyone knows a workaround to use characters like the "ñ" for
> example Español as hashkeys ?
> I get the
On Wed, 3 Oct 2001, Tyler Cruickshank wrote:
> I have a hash that I am storing arrays in. Each array corresponds to
> one hour of a day. After the hash has been populated I need to cycle
> through the "days" and sum them up. So, I have written my hash such
> that each key can be looped thru vi
On Wed, Oct 03, 2001 at 03:12:55PM -0600, Tyler Cruickshank wrote:
> I have a hash that I am storing arrays in. Each array corresponds to one
> hour of a day. After the hash has been populated I need to cycle through
> the "days" and sum them up. So, I have written my hash such that each key
>
--- Tyler Cruickshank <[EMAIL PROTECTED]> wrote:
> My keys are simply data.hr1, data.hr2, data.hr3, where each key is incremented via
>the for loop.
> The problem seems to be that when I use $specSum{$name}[$i] where $name would be
>data.hr1,
> data.hr2, data.hr3 ... it doesnt work. How can I
18 matches
Mail list logo