in reply to read-only error

It is very difficult to guess what is causing a problem when provided with insufficient context.

Please provide a working example that demonstrates the problem. Follow these guidelines when writing the example:

Additionally, if you are posting an error message that specifies the line on which the error occurred it would be most helpful to tell us which line in your code is producing the error. Line 868 isn't terribly helpful.

Replies are listed 'Best First'.
Re^2: read-only error
by Anonymous Monk on Aug 24, 2006 at 18:43 UTC
    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"; }
      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.

      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...