Re: Newbie: Faster way to do this and hash problem

2002-08-17 Thread Tim . Moose
You are looping over all of the %ext keys, and provided that $ext{$6} exists, assigning a value to $tad for each key. Therefore, the final value of $tad will always be the same, i.e. the one determined by the last key. > foreach $key ( keys %ext ) {# > if (exists

Newbie: Faster way to do this and hash problem

2002-08-17 Thread Thoenen, Peter Mr. EPS
Hello, 2 questions on the same script Parsing a file and trying to replace all instances of a certain combination with another combination. Prob is it seems to take a rather long time to do this. Anybody think of a quicker way to go about this, rather new to perl programming or is it it just d

Re: Hash problem

2001-04-12 Thread Carl Jolley
On Wed, 11 Apr 2001, $Bill Luebkert wrote: > Fabio Quintão (Perl++) wrote: > > > > Hi all, > > > > i'm doing a perl script and i have problems with that.its easy for > > almost all of you to answer that.i have 2 lists like > > @a= (1,2,3,4,5); > > @b = (1,2,6,

Re: dereferencing hash problem

2000-12-08 Thread Carl Jolley
On Thu, 7 Dec 2000, Martin, James S. wrote: > The following code produces this result: > > "The key is HASH(0x3649f4) and the values is" > > > Of course I'd like to see the actual key name and value.. What am I doing > wrong? > > %win2k_counters= { > > 'CommitedBytesInUse' => "\\Memor

RE: dereferencing hash problem

2000-12-07 Thread Jesse Sookne
ry\\Available MBytes", ); while (($key, $value) = each (%win2k_counters)) { print "The key is $key and the value is $value\n"; } -Jesse Sookne -----Original Message- From: Martin, James S. [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 07, 2000 4:45 PM To: P

dereferencing hash problem

2000-12-07 Thread Martin, James S.
The following code produces this result: "The key is HASH(0x3649f4) and the values is" Of course I'd like to see the actual key name and value.. What am I doing wrong? Thanks, James %win2k_counters= { 'CommitedBytesInUse' => "\\Memory\\ Committed Bytes In Use", 'MbytesAvail' =>