in reply to Re: read-only error
in thread read-only error

While using warnings. It states that theres a "Use of uninitialized value in split at line 269. below is the code:
# Grabs each district from all_store array foreach my $dist_only (@all_store_info) { my @array = split(/ / , $dist_only); #line 269 my $test = @array; next if $test < 2; $distlist = "$array[1] $array[2] $array[3]"; push(@dist_list, $distlist); #print "$distlist\n"; }

Replies are listed 'Best First'.
Re^3: read-only error
by imp (Priest) on Aug 24, 2006 at 19:05 UTC
    You didn't address the issues I listed in my response. Please re-read that node, and this one:
    How (Not) To Ask A Question - Only Post Relevant Code.

    I want to help you, but you aren't providing the information that is neccesary to do it effectively. Help us help you.

Re^3: read-only error
by grep (Monsignor) on Aug 24, 2006 at 18:47 UTC
    All it's saying is that $dist_only is empty. You can correct it with.
    foreach my $dist_only (@all_store_info) { next if (!$dist_only); my @array = split(/ / , $dist_only);
    But that is FAR from worst problem with that code. Re-read these posts and try to fix all your code before posting again.


    grep
    Mynd you, mønk bites Kan be pretti nasti...