Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat would cause Perl to dump core?
    primarykey
    data
    text
    <p>What are the most common reasons that I would be getting this error from running a Perl script:</p> <pre><code>Memory fault(coredump) </code></pre> <p>I am running two SQL commands beforehand that only store ~1500 rows each with 6 fields. The SQL works fine out of the script, so I don't think I'm getting the error from that. And half of my code runs before it takes a bomb and gives me that error. </p> <p>So what are the most common reasons for this error and what might my reason be?</p> <p>EDIT - heres the code that works</p> <pre><code>my $i; $i = 0; while ($DBS-&gt;SQLFetch() == *PLibdata::RET_OK) { while ($i != $colnamelen) { if ($i == 1) { $rowfetch = $DBS-&gt;{Row}-&gt;GetCharValue($colname[$i]); $rowfetch =~ s/(?=..$)/:/; printline($rowfetch); $i++; } if ($i == 2) { $rowfetch = $DBS-&gt;{Row}-&gt;GetCharValue($colname[$i]); $rowfetch =~ s/(?=..$)/:/; printline($rowfetch); $i++; } if ($i == 10) { $rowfetch = $DBS-&gt;{Row}-&gt;GetCharValue("meetdays"); $rowfetch =~ s/-//gi; printline($rowfetch); $i++; } if ($i == 12) { $rowfetch = $DBS-&gt;{Row}-&gt;GetCharValue("fullname"); my ($lname, $fname) = split /,\s*/, $rowfetch; $rowfetch = $fname; printline($rowfetch); $rowfetch = $lname; printline($rowfetch); $i=$i+2; } else { $rowfetch = $DBS-&gt;{Row}-&gt;GetCharValue($colname[$i]); printline($rowfetch); $i++; } } $i=0; printf $fh "\n"; } </code></pre> <p>Heres the code that doesnt work - All that was done was optimizing the sql fetch command</p> <pre><code>my $i; $i = 0; while ($DBS-&gt;SQLFetch() == *PLibdata::RET_OK) { while ($i != $colnamelen) { $rowfetch = $DBS-&gt;{Row}-&gt;GetCharValue($colname[$i]); if ($i == 1) { $rowfetch =~ s/(?=..$)/:/; printline($rowfetch); $i++; } if ($i == 2) { $rowfetch =~ s/(?=..$)/:/; printline($rowfetch); $i++; } if ($i == 10) { $rowfetch =~ s/-//gi; printline($rowfetch); $i++; } if ($i == 12) { my ($lname, $fname) = split /,\s*/, $rowfetch; $rowfetch = $fname; printline($rowfetch); $rowfetch = $lname; printline($rowfetch); $i=$i+2; } else { printline($rowfetch); $i++; } } $i=0; printf $fh "\n"; } </code></pre> <p>Oh and by the way, there is a functioning SQL statement before this while loop goes into action.. I just didnt want to waste space.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload