From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,3c25b735ad2bcf69 X-Google-Attributes: gidfee84,public X-Google-Thread: 10259a,3c25b735ad2bcf69 X-Google-Attributes: gid10259a,public From: pm@katz.cc.univie.ac.at (Peter Marksteiner) Subject: Re: Getopts Problem on OSF/1 Date: 1995/07/06 Message-ID: <3tgp2k$p02@ftp.univie.ac.at>#1/1 X-Deja-AN: 105732234 references: <3tep2f$6bk@cheetah.net-works.net> followup-to: comp.lang.perl,comp.unix.osf.osf1 organization: Vienna University, Austria newsgroups: comp.lang.perl,comp.unix.osf.osf1 Daniel Anderson (andersdc@net-works.net) wrote: : I am having a problem with Getopts running perl5 on a DEC Alpha : with OSF/1. The script core dumps in the Getopts routine... I'm not sure I have a solution, but definitely I had the same problem. I traced it to the "eval"-statements in the Getopts routine. The perl 5 version of eval behaves rather differently from its perl 4 predecessor, but I don't know what the differences are - except that perl 5 eval on OSF/1 sometimes dumps core. I implemented a brute-force workaround: I modified the Getopts routine to produce an associative array $opt_{"h"}, $opt_{"v"}, ..., rather than single variables $opt_h, $opt_v etc.; this can be done without an eval. Of course, this requires analogous modifications of all programs calling the Getopts routine. -- Peter Marksteiner Vienna University Computer Center Universitaetsstrasse 7 A-1010 Vienna, Austria e-mail: Peter.Marksteiner@univie.ac.at Tel: (+43 1) 406 58 22 255 FAX: (+43 1) 406 58 22 170