* Problem with a perl program , (Perl4.03)
@ 1995-08-08 4:00 Max Hadersbeck
1995-08-09 4:00 ` John P. Speno
0 siblings, 1 reply; 2+ messages in thread
From: Max Hadersbeck @ 1995-08-08 4:00 UTC (permalink / raw)
To: pmaier, max
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 "<ausgabe>\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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Problem with a perl program , (Perl4.03)
1995-08-08 4:00 Problem with a perl program , (Perl4.03) Max Hadersbeck
@ 1995-08-09 4:00 ` John P. Speno
0 siblings, 0 replies; 2+ messages in thread
From: John P. Speno @ 1995-08-09 4:00 UTC (permalink / raw)
In <407tau$rfe@sparcserver.lrz-muenchen.de> Max Hadersbeck <max@cis.uni-muenchen.de> writes:
> s/\/\/[^\@]*@/\n/g; <<<<<<<<---------- this line produces a segmentation
>fault ??? Why
You need to escape the @ like this:
s//\/[^\@]*\@/\n/g;
or else perl thinks you are talking about some array variable.
--
John P. Speno, speno@swarthmore.edu, Swarthmore College Computing Center
"There is no wisdom greater than kindness."
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1995-08-09 4:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-08-08 4:00 Problem with a perl program , (Perl4.03) Max Hadersbeck
1995-08-09 4:00 ` John P. Speno
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox