in reply to Database issues
Keep in mind, if you're using a key that is a variable, it will change at any given point throughout the program as you redefine what $this is. When you call it, you can really only say it's getting over-written if $this is constant and never changing.
Also note that if you're doing some test down the line, if $that is a string, make sure you're using the text operators (eq, for example) as opposed to the numerical operators (==, !=, etc).#/!usr/bin/perl use strict; my $this = "key1"; my $that = "in1"; $hashname{$this} = $that; # $hashname{'key1'} is 'in1' $this = "key2"; $that = "in2"; $hashname{$this} = $that; # $hashname{'key2'} is 'in2' # $hashname{'key1'} is still 'in1' # eof
Without a better description of your problem, or at least a code snippet, I'm not sure you're going to get the 100% answer you're looking for.
--Coplan
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Database issues
by Anonymous Monk on Apr 09, 2003 at 16:27 UTC | |
by derby (Abbot) on Apr 09, 2003 at 16:33 UTC | |
by nothingmuch (Priest) on Apr 09, 2003 at 16:42 UTC | |
by Anonymous Monk on Apr 09, 2003 at 17:09 UTC | |
by nothingmuch (Priest) on Apr 09, 2003 at 17:15 UTC | |
by Anonymous Monk on Apr 09, 2003 at 18:48 UTC | |
by nothingmuch (Priest) on Apr 09, 2003 at 18:55 UTC | |
by Anonymous Monk on Apr 09, 2003 at 17:37 UTC | |
by nothingmuch (Priest) on Apr 09, 2003 at 18:18 UTC |