in reply to use strict and use Getopts

Declare your variables using the use vars pragma. This will allow you to use those variables for use with Getopt::Std without having to declare them with my. Check the use vars link for more info.
#!/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";

Rich36
There's more than one way to screw it up...