distinguish $! vaules
From: Peter Michael (dog_at_dog.dog)
Date: 06/30/04
- Next message: Gunnar Hjalmarsson: "Re: HTTP::Request, trailing slash"
- Previous message: Purl Gurl: "Re: limitations of forking on windows"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 30 Jun 2004 17:44:53 +0200
Hi,
what is currently the preferred way to distinguish between different
values of $! ? I suppose that %! was created to this end (sample code?)
but should I use Switch(3) instead today?
use Errno qw(:POSIX);
use Switch;
open my $fh, "file" or do
{ switch($!)
{ case ENOENT { warn "you should first create the file\n"; }
case EACCES { warn "you are not allowed to see this\n"; }
else { warn "some other error...\n"; }
}
};
Any hints welcome (Anno? ;-).
Best regards,
Peter
- Next message: Gunnar Hjalmarsson: "Re: HTTP::Request, trailing slash"
- Previous message: Purl Gurl: "Re: limitations of forking on windows"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|