From lewart at uiuc.edu Thu Oct 16 12:17:32 2003 From: lewart at uiuc.edu (Daniel S. Lewart) Date: Mon Aug 2 21:27:35 2004 Subject: [CMI.PM] Meeting Tue Oct 21 19:00 @ Manzella's in Champaign Message-ID: <20031016121731.A5386@staff1.cso.uiuc.edu> Champaign-Urbana Perl Mongers, Our next meeting shall be: * Tue Oct 21 19:00-21:00 * Manzella's Italian Patio * 115 S First St / Champaign Lots of Perl (and Mozilla) stuff has been happening lately: * Perl 5.8.1 released! * Perl Cookbook, 2nd Edition published! * Mozilla Firebird 0.7 and Mozilla 1.5 released! We'll be in the non-smoking section of the restaurant again. Cheers, Dan http://cmi.pm.org/ From lewart at uiuc.edu Thu Oct 16 12:47:31 2003 From: lewart at uiuc.edu (Daniel S. Lewart) Date: Mon Aug 2 21:27:35 2004 Subject: [CMI.PM] Getopt::Long UPPERCASING EVERYTHING (fwd) Message-ID: <20031016124731.A6857@staff1.cso.uiuc.edu> ----- Forwarded message from mitch@ncsa.uiuc.edu ----- Date: Wed, 08 Oct 2003 10:54:48 -0500 To: CU Perlmongers From: Mitch Kutzko Subject: Getopt::Long UPPERCASING EVERYTHING Hi, folks -- Looking for a little help with module Getopt::Long. I have it working fine in a script to processing command line/config file options, but if I supply text to it via the config file option, it uppercases the entire string. Is there a way to tell it to just hand me the string as it was entered? I'm already using Getopt::Long::Configure ("bundling"); # Allow long and short args both To handle both long and short arguments, but couldn't find an option that handles case. Thanks! Mitch -- Mitch Kutzko | mitch@dast.nlanr.net | mitch@ncsa.uiuc.edu | 217-333-1199 http://hobbes.ncsa.uiuc.edu/ ----- End forwarded message ----- From mepstein at uiuc.edu Thu Oct 16 13:30:00 2003 From: mepstein at uiuc.edu (Milt Epstein) Date: Mon Aug 2 21:27:35 2004 Subject: [CMI.PM] Getopt::Long UPPERCASING EVERYTHING (fwd) In-Reply-To: <20031016124731.A6857@staff1.cso.uiuc.edu> Message-ID: On Thu, 16 Oct 2003, Daniel S. Lewart wrote: > ----- Forwarded message from mitch@ncsa.uiuc.edu ----- > > Date: Wed, 08 Oct 2003 10:54:48 -0500 > To: CU Perlmongers > From: Mitch Kutzko > Subject: Getopt::Long UPPERCASING EVERYTHING > > Hi, folks -- Looking for a little help with module Getopt::Long. > > I have it working fine in a script to processing command line/config > file options, but if I supply text to it via the config file option, > it uppercases the entire string. > > Is there a way to tell it to just hand me the string as it was > entered? I'm already using > > Getopt::Long::Configure ("bundling"); # Allow long and short args both > > To handle both long and short arguments, but couldn't find an option > that handles case. > > Thanks! > > Mitch I don't really understand what you're asking/trying to do (some examples and/or some code would be helpful), but does the option "ignore_case" help? Milt Epstein Research Programmer Integration and Software Engineering (ISE) Campus Information Technologies and Educational Services (CITES) University of Illinois at Urbana-Champaign (UIUC) mepstein@uiuc.edu From lewart at uiuc.edu Thu Oct 16 14:21:23 2003 From: lewart at uiuc.edu (Daniel S. Lewart) Date: Mon Aug 2 21:27:36 2004 Subject: [CMI.PM] Getopt::Long UPPERCASING EVERYTHING (fwd) Message-ID: <20031016142123.B15994@staff1.cso.uiuc.edu> ----- Forwarded message from champaign-urbana-owner@mail.pm.org ----- Date: Thu, 16 Oct 2003 13:38:12 -0500 To: CU Perlmongers From: Mitch Kutzko Subject: Re: [CMI.PM] Getopt::Long UPPERCASING EVERYTHING (fwd) > > ----- Forwarded message from mitch@ncsa.uiuc.edu ----- > > > > Date: Wed, 08 Oct 2003 10:54:48 -0500 > > To: CU Perlmongers > > From: Mitch Kutzko > > Subject: Getopt::Long UPPERCASING EVERYTHING > > > > Hi, folks -- Looking for a little help with module Getopt::Long. > > > > I have it working fine in a script to processing command line/config > > file options, but if I supply text to it via the config file option, > > it uppercases the entire string. > > > > Is there a way to tell it to just hand me the string as it was > > entered? I'm already using > > > > Getopt::Long::Configure ("bundling"); # Allow long and short args both > > > > To handle both long and short arguments, but couldn't find an option > > that handles case. > > > > Thanks! > > > > Mitch > I don't really understand what you're asking/trying to do (some > examples and/or some code would be helpful), but does the option > "ignore_case" help? I have a config file that I'm ready. If it contains: CONTACTNAME = Mitch Kutzko I get: MITCH KUTZKO If I specify the same option via command line and give: perl woof.pl -a Mitch Kutzko I get: Mitch Kutzko An excerpted code sample follows: #------------------------- sub get_opts() { Getopt::Long::Configure ("bundling"); # Allow long and short args both # Using a, b, c, d, f, g, h, i, l, m, n, o, p s, t, u, v, w GetOptions( 'group|g=s' => \$GROUP, 'port|p=s' => \$PORT, 'ttl|l=s' => \$TTL, 'configfile|f=s' => \$CONFIGFILE, 'centralservername|c=s' => \$CENTRALSERVERNAME, 'serverptcport|t=s' => \$SERVERTCPPORT, 'becentralserver|b' => \$becentralserver, 'noshutdownmsg|u' => \$noshutdownmsg, 'nohtml|n' => \$nohtml, 'stdout|s' => \$stdout, 'stopme|o' => \$stopme, 'SHOWMOTD|m' => \$showmotd, 'MOTD|d=s' => \$MOTD, 'CONTACTNAME|a=s' => \$CONTACTNAME, 'CONTACTINFO|i=s' => \$CONTACTINFO, 'help|h|?' => \$needs_help ) || die ("Unknown option (see above) included in the command line, triggered" ); #[ much snippage ] open(CONFIGFILE, $CONFIGFILE) || die ("CONFIGFILE open failed - \"$CONFIGFILE\"" ); while () { chomp; # no newline s/#.*//; # no comments s/^\s+//; # no leading white s/\s+$//; # no trailing white next unless length; # anything left? my ($var, $value) = split(/\s*=\s*/, uc $_, 2); $opts{$var} = $value; } close(CONFIGFILE) || die ("Couldn't close CONFIGFILE" ); foreach my $var (sort keys %opts) { if ($var eq "GROUP") { $GROUP = $opts{$var}; } elsif ($var eq "PORT") { $PORT = $opts{$var}; } elsif ($var eq "TTL") { $TTL = $opts{$var}; } elsif ($var eq "NOSHUTDOWNMSG") { $noshutdownmsg = $opts{$var}; } elsif ($var eq "NOHTML") { $nohtml = $opts{$var}; } elsif ($var eq "SHOWMOTD") { $showmotd = $opts{$var}; } elsif ($var eq "MOTD") { $MOTD = $opts{$var}; } elsif ($var eq "STDOUT") { $stdout = $opts{$var}; } elsif ($var eq "STOPME") { $stopme = $opts{$var}; } elsif ($var eq "CONTACTNAME") { $CONTACTNAME = $opts{$var}; } elsif ($var eq "CONTACTINFO") { $CONTACTINFO = $opts{$var}; } elsif ($var eq "CENTRALSERVERNAME") { $CENTRALSERVERNAME = lc($opts{$var}); } elsif ($var eq "SERVERTCPPORT") { $SERVERTCPPORT = $opts{$var}; } elsif ($var eq "BECENTRALSERVER") { $becentralserver = $opts{$var}; } else { die ("Unknown option in config file \"$CONFIGFILE\" - \"$var\""); } } #[ much snippage ] } #----------------------------- # Inside main here.... get_opts(); # Find out what command line options they gave us, or read from config file if they didn't. #[ much snippage ] print "This Beacon is reporting as \"$thisbeacon\", OS is $^O. Current PID is $$.\n"; if ($CONTACTNAME eq "") { print "No Contact Name specified for this Beacon. PLEASE EDIT beacon.conf!\n"; } else { print "Contact Name for this Beacon: \"$CONTACTNAME\".\n"; } if ($CONTACTINFO eq "") { print "No Contact Information specified for this Beacon. PLEASE EDIT beacon.conf!\n"; } else { print "Contact Information for this Beacon: \"$CONTACTINFO\".\n"; } printf "Perl version is %vd, ", $^V; print "Beacon started at: $starttime"; #---------------------------- Any help appreciated..... Thanks! Mitch -- Mitch Kutzko | mitch@dast.nlanr.net | mitch@ncsa.uiuc.edu | 217-333-1199 http://hobbes.ncsa.uiuc.edu/ ----- End forwarded message ----- From mitch at ncsa.uiuc.edu Thu Oct 16 14:27:42 2003 From: mitch at ncsa.uiuc.edu (Mitch Kutzko) Date: Mon Aug 2 21:27:36 2004 Subject: [CMI.PM] Getopt::Long UPPERCASING EVERYTHING (fwd) Message-ID: <3.0.5.32.20031016142742.036b2950@pop.ncsa.uiuc.edu> > > ----- Forwarded message from mitch@ncsa.uiuc.edu ----- > > > > Date: Wed, 08 Oct 2003 10:54:48 -0500 > > To: CU Perlmongers > > From: Mitch Kutzko > > Subject: Getopt::Long UPPERCASING EVERYTHING > > > > Hi, folks -- Looking for a little help with module Getopt::Long. > > > > I have it working fine in a script to processing command line/config > > file options, but if I supply text to it via the config file option, > > it uppercases the entire string. > > > > Is there a way to tell it to just hand me the string as it was > > entered? I'm already using > > > > Getopt::Long::Configure ("bundling"); # Allow long and short args both > > > > To handle both long and short arguments, but couldn't find an option > > that handles case. > > > > Thanks! > > > > Mitch > > I don't really understand what you're asking/trying to do (some > examples and/or some code would be helpful), but does the option > "ignore_case" help? I have a config file that I'm ready. If it contains: CONTACTNAME = Mitch Kutzko I get: MITCH KUTZKO If I specify the same option via command line and give: perl woof.pl -a Mitch Kutzko I get: Mitch Kutzko An excerpted code sample follows: #------------------------- sub get_opts() { Getopt::Long::Configure ("bundling"); # Allow long and short args both # Using a, b, c, d, f, g, h, i, l, m, n, o, p s, t, u, v, w GetOptions( 'group|g=s' => \$GROUP, 'port|p=s' => \$PORT, 'ttl|l=s' => \$TTL, 'configfile|f=s' => \$CONFIGFILE, 'centralservername|c=s' => \$CENTRALSERVERNAME, 'serverptcport|t=s' => \$SERVERTCPPORT, 'becentralserver|b' => \$becentralserver, 'noshutdownmsg|u' => \$noshutdownmsg, 'nohtml|n' => \$nohtml, 'stdout|s' => \$stdout, 'stopme|o' => \$stopme, 'SHOWMOTD|m' => \$showmotd, 'MOTD|d=s' => \$MOTD, 'CONTACTNAME|a=s' => \$CONTACTNAME, 'CONTACTINFO|i=s' => \$CONTACTINFO, 'help|h|?' => \$needs_help ) || die ("Unknown option (see above) included in the command line, triggered" ); #[ much snippage ] open(CONFIGFILE, $CONFIGFILE) || die ("CONFIGFILE open failed - \"$CONFIGFILE\"" ); while () { chomp; # no newline s/#.*//; # no comments s/^\s+//; # no leading white s/\s+$//; # no trailing white next unless length; # anything left? my ($var, $value) = split(/\s*=\s*/, uc $_, 2); $opts{$var} = $value; } close(CONFIGFILE) || die ("Couldn't close CONFIGFILE" ); foreach my $var (sort keys %opts) { if ($var eq "GROUP") { $GROUP = $opts{$var}; } elsif ($var eq "PORT") { $PORT = $opts{$var}; } elsif ($var eq "TTL") { $TTL = $opts{$var}; } elsif ($var eq "NOSHUTDOWNMSG") { $noshutdownmsg = $opts{$var}; } elsif ($var eq "NOHTML") { $nohtml = $opts{$var}; } elsif ($var eq "SHOWMOTD") { $showmotd = $opts{$var}; } elsif ($var eq "MOTD") { $MOTD = $opts{$var}; } elsif ($var eq "STDOUT") { $stdout = $opts{$var}; } elsif ($var eq "STOPME") { $stopme = $opts{$var}; } elsif ($var eq "CONTACTNAME") { $CONTACTNAME = $opts{$var}; } elsif ($var eq "CONTACTINFO") { $CONTACTINFO = $opts{$var}; } elsif ($var eq "CENTRALSERVERNAME") { $CENTRALSERVERNAME = lc($opts{$var}); } elsif ($var eq "SERVERTCPPORT") { $SERVERTCPPORT = $opts{$var}; } elsif ($var eq "BECENTRALSERVER") { $becentralserver = $opts{$var}; } else { die ("Unknown option in config file \"$CONFIGFILE\" - \"$var\""); } } #[ much snippage ] } #----------------------------- # Inside main here.... get_opts(); # Find out what command line options they gave us, or read from config file if they didn't. #[ much snippage ] print "This Beacon is reporting as \"$thisbeacon\", OS is $^O. Current PID is $$.\n"; if ($CONTACTNAME eq "") { print "No Contact Name specified for this Beacon. PLEASE EDIT beacon.conf!\n"; } else { print "Contact Name for this Beacon: \"$CONTACTNAME\".\n"; } if ($CONTACTINFO eq "") { print "No Contact Information specified for this Beacon. PLEASE EDIT beacon.conf!\n"; } else { print "Contact Information for this Beacon: \"$CONTACTINFO\".\n"; } printf "Perl version is %vd, ", $^V; print "Beacon started at: $starttime"; #---------------------------- Any help appreciated..... Thanks! Mitch -- Mitch Kutzko | mitch@dast.nlanr.net | mitch@ncsa.uiuc.edu | 217-333-1199 http://hobbes.ncsa.uiuc.edu/ From jmh at researchpress.com Thu Oct 16 14:28:45 2003 From: jmh at researchpress.com (Jeff Helgesen) Date: Mon Aug 2 21:27:36 2004 Subject: [CMI.PM] Getopt::Long UPPERCASING EVERYTHING (fwd) References: <20031016142123.B15994@staff1.cso.uiuc.edu> Message-ID: <007f01c3941b$b7e0d9a0$0e07a8c0@researchpress.com> > my ($var, $value) = split(/\s*=\s*/, uc $_, 2); I'm just a hack, but aren't you uppercasing the line with the uc here before it's fed into $value? From mitch at ncsa.uiuc.edu Thu Oct 16 14:31:24 2003 From: mitch at ncsa.uiuc.edu (Mitch Kutzko) Date: Mon Aug 2 21:27:36 2004 Subject: [CMI.PM] Getopt::Long UPPERCASING EVERYTHING (fwd) In-Reply-To: <007f01c3941b$b7e0d9a0$0e07a8c0@researchpress.com> References: <20031016142123.B15994@staff1.cso.uiuc.edu> Message-ID: <3.0.5.32.20031016143124.036b2950@pop.ncsa.uiuc.edu> At 02:28 PM 10/16/2003 -0500, you wrote: > > my ($var, $value) = split(/\s*=\s*/, uc $_, 2); > > I'm just a hack, but aren't you uppercasing the line with the uc here before > it's fed into $value? "Doh!"..... Um, yeah -- That'd be it, alrighty. Forest-for-the-trees problem here. ;-) Thanks. Mitch -- Mitch Kutzko | mitch@dast.nlanr.net | mitch@ncsa.uiuc.edu | 217-333-1199 http://hobbes.ncsa.uiuc.edu/ From lewart at uiuc.edu Tue Oct 21 10:56:13 2003 From: lewart at uiuc.edu (Daniel S. Lewart) Date: Mon Aug 2 21:27:36 2004 Subject: [CMI.PM] Re: Meeting Tue Oct 21 19:00 @ Manzella's in Champaign In-Reply-To: <20031016121731.A5386@staff1.cso.uiuc.edu>; from lewart@uiuc.edu on Thu, Oct 16, 2003 at 12:17:31PM -0500 References: <20031016121731.A5386@staff1.cso.uiuc.edu> Message-ID: <20031021105612.A15960@staff1.cso.uiuc.edu> Champaign-Urbana Perl Mongers, > Our next meeting shall be: > * Tue Oct 21 19:00-21:00 > * Manzella's Italian Patio > * 115 S First St / Champaign That's tonight! > Lots of Perl (and Mozilla) stuff has been happening lately: > * Perl 5.8.1 released! > * Perl Cookbook, 2nd Edition published! > * Mozilla Firebird 0.7 and Mozilla 1.5 released! > We'll be in the non-smoking section of the restaurant again. If I have time to prepare, I'll talk a bit about Perl 5.8.1. Otherwise I'll just talk about pizza. :) Cheers, Dan http://cmi.pm.org/ From markz at uiuc.edu Tue Oct 21 12:16:34 2003 From: markz at uiuc.edu (Mark S. Zinzow) Date: Mon Aug 2 21:27:36 2004 Subject: [CMI.PM] Re: Meeting Tue Oct 21 19:00 @ Manzella's in Champaign In-Reply-To: Your message of "Tue, 21 Oct 2003 10:56:13 CDT." <20031021105612.A15960@staff1.cso.uiuc.edu> Message-ID: <200310211716.h9LHGZoD019610@cub.cites.uiuc.edu> Here are a few URL's I'd like to discuss tonight: Non-perl: http://www.deceptiondollar.com/ (the truth is out there!) http://www.thechallengeofcontact.com/ (hope, or fun!) http://allelectronics.com/ (next vendor for bulk order) Linux related: http://www.cites.uiuc.edu/news/ "list of on-campus Linux distributions will be maintained at http://www.uiuc.edu/ro/lag/uimirror.html " [broken] (Could you give the RO office a ring? Maybe they have Warren's form you could just sign?) Linux campus mirrors: http://lag.assembly.uiuc.edu/board/viewtopic.php?p=3#3 Nearby fast distro & Kernel mirror, no cpan tho: http://mirror.mcs.anl.gov/kernel/ rsync://mirror.mcs.anl.gov/kernel/ Really Perl related: http://safari.oreilly.com/ Only has the 1st and Perl Cookbook, 2nd Edition online. Interesting javascript wrapping books to prevent wget (which is also prohibited in the license agreement). http://safari.oreilly.com/JVXSL.asp?mode=FAQ My perl questions of the day: 1) Are there any easy ways to grab text under windows from other application windows in perl? (Like a screen scraper?) 2) Anyone know of perl scripts for mirroring like wget, but with hooks to use regular expressions to only get the most recent or other key files instead of everything? "Daniel S. Lewart" writes >Champaign-Urbana Perl Mongers, > >> Our next meeting shall be: >> * Tue Oct 21 19:00-21:00 >> * Manzella's Italian Patio >> * 115 S First St / Champaign > >That's tonight! > >> Lots of Perl (and Mozilla) stuff has been happening lately: >> * Perl 5.8.1 released! >> * Perl Cookbook, 2nd Edition published! >> * Mozilla Firebird 0.7 and Mozilla 1.5 released! > >> We'll be in the non-smoking section of the restaurant again. > >If I have time to prepare, I'll talk a bit about Perl 5.8.1. >Otherwise I'll just talk about pizza. :) > >Cheers, >Dan >http://cmi.pm.org/ >_______________________________________________ >Champaign-Urbana mailing list >Champaign-Urbana@mail.pm.org >http://mail.pm.org/mailman/listinfo/champaign-urbana