home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!darwin.sura.net!jvnc.net!rutgers!cmcl2!psinntp!psinntp!bnlux1.bnl.gov!maeva.ccd.bnl.gov!gc
- From: gc@bnl.gov (Graham Campbell)
- Newsgroups: comp.lang.perl
- Subject: SEGV in perl
- Message-ID: <1992Aug25.185319.2532@bnlux1.bnl.gov>
- Date: 25 Aug 92 18:53:19 GMT
- Sender: news@bnlux1.bnl.gov (Usenet news)
- Reply-To: gc@bnl.gov
- Organization: Brookhaven National Laboratory
- Lines: 35
-
- Why do beginners (like me) always cause trouble?
-
- The following perl script causes perl to core dump with a SEGV on a Sun
- running SunOS 4.1:
-
- #!/bin/sh -- # wish i were perl
- # set -vx
- eval 'exec perl -d -S $0 ${1+"$@"}'
- if $running_under_some_useless_shell;
- while (($key,$value) = each %ENV){
- print "$key";
- if ($key =~ /WAVE_.*/){
- delete $ENV{$key};
- print " deleted";
- };
- print "\n";
- };
- print "\nRecapitulating\n";
- while (($key,$value) = each %ENV){
- print "$key\n";
- }
-
- And "perl -v" says:
-
- This is perl, version 4.0
-
- $RCSfile: perl.c,v $$Revision: 4.0.1.6 $$Date: 91/11/11 16:38:45 $
- Patch level: 19
-
- Can anyone enlighten me?
-
- Graham
- ---
- Graham
- gc@bnl.gov
-