princepawn has asked for the wisdom of the Perl Monks concerning the following question:
use Getopt::Long; use Pod::Usage; #use SQL::Generator; GetOptions ( 'table=s' => \$table, 'id_field=s' => \$email_field, 'state_field=s' => \$state_field, 'zip_field=s' => \$zip_field, 'dob_field=s' => \$dob_field, 'help|?' => \$help, man => \$man ) or die pod2usage(2) ; pod2usage(1) if $help; pod2usage(-exitstatus => 0, -verbose => 2) if $man; print <<EOSQL SELECT $id_field, $email_field, $state_field, $zip_field, $dob_field FROM $table WHERE $zip_field like '336%' or $zip_field like '335%' or $zip_field like '346%' or $zip_field like '337%' or $zip_field like '342%' EOSQL
[tbone@MDB 202025-007]$ perl sql.pl -? Usage: sql.pl [options] sql.pl --table=tabla --id_field=GID --state_field=STATE --dob_fie +ld=DOB Options: --table table --id_field id field --state_field state field --dob_field dob field -help -man [tbone@MDB 202025-007]$ perl sql.pl SELECT , , , , FROM WHERE like '336%' or like '335%' or like '346%' or like '337%' or like '342%' [tbone@MDB 202025-007]$
Carter's compass: I know I'm on the right track when by deleting something, I'm adding functionality
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Required options processing Getopt::Long
by particle (Vicar) on Aug 15, 2003 at 17:43 UTC | |
|
Re: Required options processing Getopt::Long
by Abigail-II (Bishop) on Aug 15, 2003 at 20:43 UTC | |
| |
|
Re: Required options processing Getopt::Long
by antirice (Priest) on Aug 16, 2003 at 00:07 UTC | |
by Aristotle (Chancellor) on Aug 16, 2003 at 18:11 UTC |