Return to Snippet

Revision: 41506
at February 19, 2011 03:30 by Mazzaroth


Initial Code
	#--------------------------------------------------------------------------
	# handle the command line arguments
	#
	if ( $#ARGV == -1)
	{
		&usage;
		exit 0;
	}

	while (@ARGV) 
	{
		$argument = shift(@ARGV);
	
		if ($argument eq "-HELP"  ||  $argument eq "-H") 
		{
		    &usage;
		    exit 0;
		}
		elsif ($argument eq "-file"        ||  $argument eq "-f") 
		{
			$file = shift(@ARGV);
		}
		elsif ($argument eq "-verbose"     ||  $argument eq "-v") 
		{
			# input data come live from the specified htget output file. Faster.
		  $verbose = 1;
		}
		elsif ($argument eq "-DEBUG") 
		{
			$DEBUG_LEVEL = shift(@ARGV);
		}
		elsif ($argument eq "-DOCUMENT"  ||  $argument eq "-D") 
		{
		    &document;
		    exit 0;
		}
		elsif ($argument eq "-ABOUT"  ||  $argument eq "-A") 
		{
		    &about;
		    exit 0;
		}
		elsif ($argument eq "-REL_NOTES"  ||  $argument eq "-R") 
		{
		    &rel_notes;
		    exit 0;
		}
		else
		{
			print "ERROR: unknown argument '$argument'.\n";
	    &usage;
	    exit 0;
		}
	}

Initial URL


Initial Description


Initial Title
handle the command line arguments

Initial Tags


Initial Language
Perl