Exit Functions





The exit function is the more traditional way to end the program.Exit takes a numeric argument and returns the argument to the program from which you ran the Perl program.So far, we have only seen how to run our Perl program from our operating system.
$a=0;
while($a<=10)
{
if($a=5)
{
exit(0);
}
print"$a\n";
$a++;
}
This program displays:
0
1
2
3
4
Domain Name Search
|