<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Kommentare zu: perl Script Parameter</title>
	<atom:link href="http://www.fukz.de/2007/07/02/perl-script-parameter/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fukz.de/2007/07/02/perl-script-parameter/</link>
	<description>Manche Hähne glauben, dass die Sonne ihretwegen aufgeht. (Theodor Fontane)</description>
	<lastBuildDate>Thu, 03 Jan 2013 14:28:45 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>Von: Chris</title>
		<link>http://www.fukz.de/2007/07/02/perl-script-parameter/comment-page-1/#comment-121</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Sat, 01 Mar 2008 17:26:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.fukz.de/?p=80#comment-121</guid>
		<description><![CDATA[Es geht einfacher mit Getopt::Std and Getopt::Long. 
zB
&lt;code&gt;
#!/usr/bin/perl
use Getopt::Long;
&lt;br /&gt;
my ($help, @url, $size);
&lt;br /&gt;
#-- prints usage if no command line parameters are passed or there is an unknown
#   parameter or help option is passed
usage() if ( ! GetOptions(&#039;help&#124;?&#039; =&gt; \$help, &#039;url=s&#039; =&gt; \@url, &#039;size=i&#039; =&gt; \$size)
         or @ARGV &lt; 1 or defined $help );
&lt;br /&gt; 
sub usage
{
  print &quot;Unknown option: @_\n&quot; if ( @_ );
  print &quot;usage: program [--url URL] [--size SIZE] [--help&#124;-?]\n&quot;;
  exit;
}
&lt;/code&gt;]]></description>
		<content:encoded><![CDATA[<p>Es geht einfacher mit Getopt::Std and Getopt::Long.<br />
zB<br />
<code><br />
#!/usr/bin/perl<br />
use Getopt::Long;<br />
<br />
my ($help, @url, $size);<br />
<br />
#-- prints usage if no command line parameters are passed or there is an unknown<br />
#   parameter or help option is passed<br />
usage() if ( ! GetOptions('help|?' =&gt; \$help, 'url=s' =&gt; \@url, 'size=i' =&gt; \$size)<br />
         or @ARGV &lt; 1 or defined $help );<br />
<br /> <br />
sub usage<br />
{<br />
  print "Unknown option: @_\n" if ( @_ );<br />
  print "usage: program [--url URL] [--size SIZE] [--help|-?]\n";<br />
  exit;<br />
}<br />
</code></p>
]]></content:encoded>
	</item>
</channel>
</rss>
