[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] out of memory



Hi,

can me tell anyone what's the difference between this two lines:

@felder= ('Feld1', 'Feld2', 'Feld3', 'Feld4'); #ok!
@felder= ('Feld1', 'Feld2', 'Feld3', 'Arsch'); #out of memory

I tried to create an array (it worked) and pass it to a subroutine. Then the 
programm stopped with an "out of memory" error or crashed. The error appears 
only when the second line is activated.

Here are the two files I use:

### versuch.pl ###

require "mydb.pl";
#@felder= ('Feld1', 'Feld2', 'Feld3', 'Feld4');
@felder= ('Feld1', 'Feld2', 'Feld3', 'Arsch'); #out of memory
$dateiname= 'versuch.try';
&AppendDB ($dateiname, @felder);

### mydb.pl ###

sub AppendDB
{
  my $dbname=$_[0];
  my $datensatz= join '&=&',($_[1]..$_[-1]); 
  open DATA, ">>$dbname";
  print DATA "$datensatz\n";
  close DATA;
}

I tried also to pass the parameters not as an array, but all separately. But 
it worked only with the parameters 'Feld1', 'Feld2', 'Feld3', 'Feld4' and not 
with .... 'Arsch'.

Can anyone tell me what's wrong?

Regards,

Michael Heberle

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org