Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl $type = $ARGV[0]; $argument = $ARGV[1]; if( $type eq 'job' || $type eq 'member' || $type eq 'file' ) { print "yes..."; } else { print "The parameters for this program are as follows: [job/member/fil +e] [jobnumber/membernumber/filename]"; die; }
else { print "The parameters for this program are as follows: [job/member/fil +e] [jobnumber/membernumber/filename]"; exit; }
Edited by Arunbear: Changed title from 'Provide your valuable suggestion', as per Monastery guidelines
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: exit or die in error handling?
by monkey_boy (Priest) on Apr 14, 2005 at 10:16 UTC | |
by Thilosophy (Curate) on Apr 15, 2005 at 01:10 UTC | |
|
Re: exit or die in error handling?
by myuserid7 (Scribe) on Apr 14, 2005 at 10:15 UTC | |
|
Re: exit or die in error handling?
by QM (Parson) on Apr 14, 2005 at 15:30 UTC | |
|
Re: exit or die in error handling?
by Taulmarill (Deacon) on Apr 14, 2005 at 10:17 UTC | |
by monkey_boy (Priest) on Apr 14, 2005 at 10:21 UTC |