E
efoss
I've run into a strange problem. I have a program that is a few
hundred lines long. I run it and it runs fine and gives me the correct
output (at least when I check a few of the output calculations
manually.) But here are some screwy things that disturb me:
1. If I comment out a module that I'm not even using, I get a
"Segmentation fault" error. (The difference is "use FileHandle;"
versus "#use FileHandle;".)
2. If I get the "Segmentation fault" error and then I comment out a
numerical sort of an array (which is working correctly), then the
"Segmentation fault" error goes away.
3. If I run the program on my debugger rather than from a terminal,
the program runs fine.
4. If I run the program on a different computer and run it from a
terminal, the program runs fine.
I don't remember ever getting "Segmentation fault" as an error message
in Perl - I think of that as a "C error", since I've seen it many
times writing C code. Does anyone have an idea what's going wrong?
(I'm not posting the code because it's long and I'm quite certain that
the details of the code won't be relevant, but I'm happy to post it.)
Thanks.
Eric
hundred lines long. I run it and it runs fine and gives me the correct
output (at least when I check a few of the output calculations
manually.) But here are some screwy things that disturb me:
1. If I comment out a module that I'm not even using, I get a
"Segmentation fault" error. (The difference is "use FileHandle;"
versus "#use FileHandle;".)
2. If I get the "Segmentation fault" error and then I comment out a
numerical sort of an array (which is working correctly), then the
"Segmentation fault" error goes away.
3. If I run the program on my debugger rather than from a terminal,
the program runs fine.
4. If I run the program on a different computer and run it from a
terminal, the program runs fine.
I don't remember ever getting "Segmentation fault" as an error message
in Perl - I think of that as a "C error", since I've seen it many
times writing C code. Does anyone have an idea what's going wrong?
(I'm not posting the code because it's long and I'm quite certain that
the details of the code won't be relevant, but I'm happy to post it.)
Thanks.
Eric