Perl Home
PERL Functions
© 2011 TutorialsPoint.COM
|
PERL die Function
Syntax
Definition and Usage
Prints the value of LIST to STDERR and calls exit with the error value contained in $!.
Return Value
Example
Following are the usage...
die "Can't cd to spool: $!\n" unless chdir '/usr/spool/news';
or
chdir '/usr/spool/news' or die "Can't cd to spool: $!\n"
or
open( FILEH, ">/tmp/test" ) || die( "Can't open file test $!\n" );
|
|

|
|
|