> Where did $var come from?
Sorry about that. That was a left over from the actual code that I
tried to pare down to be a small example. Messed that up as badly as
the copy/paste of the code made it really very ugly.
Addie
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional
> "JWK" == John W Krahn writes:
JWK> Uri Guttman wrote:
>>> "a" == addie writes:
>>
a> %hash = split(/\s/, $locus_line);
>>
>> that assigns a single pair to the hash. a SINGLE PAIR to the WHOLE
>> HASH. anything in the hash before that is wiped out. also the values
>> w
On 21/11/2010 09:56, addie wrote:
I have been fighting with this problem for over a week now he really
aggravating thing is that I had it working for over a year without
problem. have tried everything I can imagine. I've cut the code down
to a toy version to isolate the problem and it is no help
Uri Guttman wrote:
"a" == addie writes:
a> %hash = split(/\s/, $locus_line);
that assigns a single pair to the hash. a SINGLE PAIR to the WHOLE
HASH. anything in the hash before that is wiped out. also the values
will have newlines on them which isn't the main bug but is usually wrong
> "SHC" == Shawn H Corey writes:
SHC> On 10-11-21 12:49 PM, Uri Guttman wrote:
a> my %hash = ();
>>
>> no need to initialize a lexical hash with ().
SHC> Sorry but you should initialize all your variables. At one time
SHC> mod_perl did not initialize the data space; it simply r
> "a" == addie writes:
a> #!/usr/bin/
a> perl
a> \
that is VERY strange line wrapping. please be careful how you paste code
so it doesn't do that. readers can't then paste the code and run it
without cleaning up the wrapped lines.
a> use strict;
a> use warnings;
a> my %hash =
On 10-11-21 12:49 PM, Uri Guttman wrote:
a> my %hash = ();
no need to initialize a lexical hash with ().
Sorry but you should initialize all your variables. At one time
mod_perl did not initialize the data space; it simply re-used it. So
your variables started with whatever was in them
On 10-11-21 04:56 AM, addie wrote:
#!/usr/bin/
perl
\
use strict;
use warnings;
my %hash = ();
my $key = '';
open ACCESSIONS, "fix.txt" or die "Can't open fix.txt: $!\n";
while (my $locus_line =){
#This is supposed to populate
%hash.
%hash = split(/\s/, $locus_line);
foreach my $k (ke
I have been fighting with this problem for over a week now he really
aggravating thing is that I had it working for over a year without
problem. have tried everything I can imagine. I've cut the code down
to a toy version to isolate the problem and it is no help. For the
sake of this issue let's s