Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Newsgroups: comp.lang.perl Subject: Re: perl bug (pl 44) Message-ID: <11395@jpl-devvax.JPL.NASA.GOV> Date: 12 Feb 91 02:10:59 GMT References: Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Distribution: comp Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 21 In article dupuy@cs.columbia.edu writes: : The following (erroneous?) script gets a memory fault on a Sun-4 running 4.0.3: : : while (<>) : { : ( $start, $end, $line ) =~ /(\d+)-(\d+):(.*\n)/; : : @foo = $start .. $end; : : } It's not really erroneous in the sense that it should do what you've asked without core-dumping. But you're not asking it for what you want: the =~ should be an =. But using =~ on a list should merely do the pattern match on the last element, $line in this case. The real problem is that $start and $end are undefined--a program consisting of just the @foo line will core-dump too, because of a null-pointer dereference (fixed in 4.0). Thanks. Larry