[ale] perl $!

Christopher Fowler cfowler at outpostsentinel.com
Mon May 24 15:21:58 EDT 2004


What is the proper way to set $1?

I've created this function in my perl object:

sub _die {
  my ($self, $message) = @_;
  $! = $message;
  return undef;
}

I use it like this:

sub connect {
	my $self = shift;
	my $s = IO::Socket:INET->new(....)
		or return $self->_die("connect $!");
}



More information about the Ale mailing list