Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!ub!uhura.cc.rochester.edu!rochester!pt.cs.cmu.edu!o.gp.cs.cmu.edu!andrew.cmu.edu!rm55+ From: rm55+@andrew.cmu.edu (Rudolph T. Maceyko) Newsgroups: comp.lang.perl Subject: die Message-ID: Date: 26 Jan 91 19:12:53 GMT Organization: Carnegie Mellon, Pittsburgh, PA Lines: 56 From the man page: die(LIST) die LIST Outside of an eval, prints the value of LIST to STDERR and exits with the current value of $! (errno). If $! is 0, exits with the value of ($? >> 8) (`command` status). If ($? >> 8) is 0, exits with 255. Inside an eval, the error message is stuffed into $@ and the eval is terminated with the undefined value. Well, apparently, lists aren't my best datatype in PERL ;-> because I can't get die to Do The Right Thing with a list. A string works fine, so I can just concatenate everything if I wanted to.... However, die doesn't work as advertised. die 'prog: ', $$, ': invalid process', "\n"; >> Died at ./x line 3. die('prog: ', $$, ': invalid process', "\n"); >> Died at ./x line 3. die ('prog: ', $$, ': invalid process', "\n"); >> Died at ./x line 3. die +('prog: ', $$, ': invalid process', "\n"); >> Died at ./x line 3. @LIST = 'prog: ', $$, ': invalid process', "\n"; die @LIST; >> prog: at ./x line 4. @LIST = ('prog: ', $$, ': invalid process', "\n"); eval "die \@LIST"; print $@; >> Died at (eval) line 1. This is perl, version 3.0 $Header: perly.c,v 3.0.1.9 90/11/10 01:53:26 lwall Locked $ Patch level: 41 Copyright (c) 1989, 1990, Larry Wall Perl may be copied only under the terms of the GNU General Public License, a copy of which can be found with the Perl 3.0 distribution kit. Thanks for your help, Rudy +---------+ : +-----+ : Rudy Maceyko : : +-+ : : rm55+@andrew.cmu.edu : : : +-+ : rtmst@cis.pitt.edu +-+ +-+-+-+