foreach loop problem

From: BigDaDDY (ihatespam_at_hotmail.com)
Date: 01/29/04


Date: Wed, 28 Jan 2004 23:12:06 -0800

I am getting the following error with perl 5.6.1.

Modification of a read-only value attempted

However, I am not getting this error with earlier versions of Perl. Is
there a way to do the code below without raising an error?

foreach my $param (qw(E_p1 E_p2 E_p3 E_p4)){

   $param =~ s/E_//g;

   if ($default{"E_$param"}){

      $E{$param} = $default{"E_$param"});
   }
}