in reply to Re: Assigning to a hash
in thread Assigning to a hash

The perl debugger shows $columns[0] as 'willa', so I don't think any special chars are lurking...

Replies are listed 'Best First'.
Re: Re: Re: Assigning to a hash
by MZSanford (Curate) on Dec 03, 2001 at 22:15 UTC
    Is this data being read from a file ? a database? Knowing where it comes from may help me formulate a guess. What you have should work fine. If you do something like the following , does it work any better (not that it should) :
    my $key = $columns[0]; $hash{$key} = 1;

    Also, you may want to use Data::Dumper to print out the data structure to find out what is getting created.
    $ perl -e 'do() || ! do() ;' Undefined subroutine &main::try
Re: Re: Re: Assigning to a hash
by Rich36 (Chaplain) on Dec 03, 2001 at 22:14 UTC
    Weird. If $columns[0] is defined correctly, you'd think that would work. Maybe posting more code would help.
    Also, check here for other ways to Return a Unique Array.
    Rich36
    There's more than one way to screw it up...