#!/usr/bin/perl -w use strict; use Getopt::Std; my $width = 500; my $height = 500; use vars qw/$opt_h $opt_w/; getopts( 'w:h:' ); if( $opt_w ) { $width = $opt_w ; } if( $opt_h ) { $height = $opt_h ; } print "$width:$height\n";
In reply to Re: use strict and use Getopts
by Rich36
in thread use strict and use Getopts
by rbc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |