From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,f56284b3d666e2a9,start X-Google-Attributes: gidfee84,public From: Max Hadersbeck Subject: Problem with a perl program , (Perl4.03) Date: 1995/08/08 Message-ID: <407tau$rfe@sparcserver.lrz-muenchen.de>#1/1 X-Deja-AN: 107754487 distribution: world to: pmaier,max content-type: text/plain; charset=us-ascii organization: CIS Uni Muenchen x-url: news:comp.unix.osf.osf1 mime-version: 1.0 newsgroups: comp.unix.osf.osf1 x-mailer: Mozilla 1.1N (X11; I; OSF1 V3.2 alpha) Hi We have a problem with a perl script, using a substiute and a special regular expression. It is used with a regular text file. print "\n" ; while(<>) { chop; s/\025/ /g; s/\001/ /g; s/\001/ /g; s/\002/ /g; s/\003/ /g; s/\004/ /g; s/\005/ /g; s/\006/ /g; s/\007/ /g; s/\008/ /g; s/\011/ /g; # s/\012/ /g; s/\014/ /g; s/\015/ /g; s/\016/ /g; s/\017/ /g; s/\018/ /g; s/\019/ /g; s/\020/ /g; s/\021/ /g; s/\022/ /g; s/\023/ /g; s/\024/ /g; s/\025/ /g; s/\026/ /g; s/\027/ /g; s/\028/ /g; s/\029/ /g; s/\030/ /g; s/\031/ /g; s/\/\/[^\@]*@/\n/g; <<<<<<<<---------- this line produces a segmentation fault ??? Why s/\^/\n/g unless ($_ =~ /\^\s+\[/); s/\^/ /g if ($_ =~ /\^\s+\[/); s/\/\*//g; s/\[/\n[/g; s/\s+$/\n/g; s/^\s*//g; s/\@/\n_-_\n/g; print "$_\n" unless ($_ =~ /^\s+$/); } # perl test.pl < take any ascii file (for example .login) Segmentation fault What can I do. the program runs under ULTRIX perl: mipsel demand paged executable not stripped - version 2.10 But not under ALPHA UNIX, Perl4.03 Is there a later perl4 ? thanks MAX ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Dr. Maximilian Hadersbeck Centrum fuer Informations- und Sprachverarbeitung Ludwig Maximilians Universitaet Wagmuellerstr. 23 80538 Muenchen (089) 2110672, FAX (089) 2110674 max@cis.uni-muenchen.de ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~