RE: Change in "goto" behavior

2005-07-13 Thread Gardner, Sam
Title: RE: Change in "goto" behavior This kind of flexibility in a switch statement reminds me why I love perl. Sam Gardner GTO Application Development Keefe, Bruyette & Woods, Inc. 212-887-6753 -Original Message- From: Thomas, Mark - BLS CTR [mailto:[EMAIL PROTECTED]] S

RE: Change in "goto" behavior

2005-07-13 Thread Gardner, Sam
Title: Message John,       Look up function dispatch tables on perlmonks.com.  It's a pretty good alternative to switch case statements (better than if-else, anyway).        But as to your question, I don't know if there was any functionality change made.   Sam     Sam

un - Gzipping?

2005-07-07 Thread Gardner, Sam
Title: Message Does anyone know how to unzip files that are Unix gzipped?  The FAQ for Archive::Zip indicates that it's not supported, and WinZip's command line interface also apparently doesn't support it (so I can't leverage that).  Any advice appreciated.  Thanks...     Sam GardnerGTO A

RE: NET-DNS & Regex

2005-07-06 Thread Gardner, Sam
Title: RE: NET-DNS & Regex $the_ip='80.224.159.46'; $the_ip =~ /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/; $the_domain="$4.$3.$2.$1.sbl-xbl.spamhaus.org"; >>##  you're reversing the order of the IP here. . . Is there some reason you're >>doing this?  $the_domain should now equal "46.159.224.80.sbl-

RE: Why is this a problem?

2005-07-01 Thread Gardner, Sam
Title: Message See answers: my    %fh = ( aa => 1, bb =>2, cc => 3) ;  # note that each instance of $fh{$fhkey} has a different valueforeach my $fhkey ( keys %fh){    open  ( $fh{$fhkey}, ">$fhkey" )  ;## >so, you open 3 file handles, one named "1", one named "2", and one named "3" 

RE: Script printing its own source code

2005-05-31 Thread Gardner, Sam
Title: RE: Script printing its own source code 1) H. . . Did you chomp? 2) I don't think there's any problem at all with a script opening itself as a text file.  Keep in mind that when it's running it's been interpreted and is in memory (so no file sharing issue).  It could, of course, d

RE: Perl and Images

2005-05-17 Thread Gardner, Sam
Title: RE: Perl and Images Yes: 1) Open directory 2) Double-click file 3) Alt-PrintScreen 4) Open Paint 5) Ctrl-V 6) Save Okay, maybe you'll have to play around with this to get the thumbnail, but you get the idea. . . Sam Gardner GTO Application Development Keefe, Bruyette & Woods,

RE: General question.

2005-04-28 Thread Gardner, Sam
Title: RE: General question. I use perl for a number of tasks on Windows -- I find it far faster to develop scripts in perl than in some other language like VBScript (actually, for most purposes it also runs faster), and the scripts are generally more versatile.  I send myself automated emails

RE: FTP modules

2005-04-28 Thread Gardner, Sam
Title: RE: FTP modules See below -Original Message- From: Kelly Stumbaugh [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 28, 2005 12:13 PM To: Perl-Win32-Users@listserv.ActiveState.com Subject: FTP modules Does anyone running Perl on Windows recommend a module for FTP?  I hav

RE: Archive::Zip - Bad file descriptor on directories

2005-03-31 Thread Gardner, Sam
I noted I had some problems using the constants (e.g., AZ_OK) with Archive::Zip, so I went with the literal values. Sam Gardner GTO Application Development Keefe, Bruyette & Woods, Inc. 212-887-6753 -Original Message- From: Sisyphus [mailto:[EMAIL PROTECTED] Sent: Wednesday, March

RE: :Oracle copy from one PC to another

2005-02-04 Thread Gardner, Sam
Title: RE: :Oracle copy from one PC to another Yes, the machines are set up similarly, with the exception that I installed a module on one, and can now no longer retrieve it from the repository I originally got it from. Sam Gardner GTO Application Development Keefe, Bruyette & Woods, Inc.

RE: Regex Help

2005-01-27 Thread Gardner, Sam
Title: RE: Regex Help Okay, this is amazingly cloddish, but it does work and may point out where some of your regexes are going wrong.  Whenever I have difficulty, I try to simplify it down and then analyze. @strings = qw/ 2004 200412 20041201 2004-12 2004-12-01/; for (@strings){ if (/^\d

RE: Zip Enlightenment

2005-01-24 Thread Gardner, Sam
Sam Gardner GTO Application Development Keefe, Bruyette & Woods, Inc. 212-887-6753 -Original Message-From: Wagner, David --- Senior Programmer Analyst --- WGO [mailto:[EMAIL PROTECTED] Sent: Friday, January 21, 2005

Zip Enlightenment

2005-01-21 Thread Gardner, Sam
Title: Message Anyone know how to zip files in perl?  I tried downloading Tie::gzip, but found the documentation a bit obtuse (which normally wouldn't stop me, but when I tried implementing it I received errors stating I couldn't "modify a constant item in a tie").  I'd prefer a perl method

RE: EggExp Question

2005-01-14 Thread Gardner, Sam
Title: RE: EggExp Question See below, from perlre: So, your regex would be $phone_book_entry=~m/^Smith.+(?!John)/; (?!pattern) A zero-width negative look-ahead assertion. For example /foo(?!bar)/ matches any occurrence of ``foo'' that isn't followed by ``bar''. Note however that look-a

RE: Crypt::SSLeay

2005-01-10 Thread Gardner, Sam
Title: RE: Crypt::SSLeay I had to install openssl before this would work.  Do a search for "openssl" (a free windows download).  Sam Gardner GTO Application Development Keefe, Bruyette & Woods, Inc. 212-887-6753 -Original Message- From: Lundgren, Scott [mailto:[EMAIL PRO

RE: Task Scheduler

2005-01-10 Thread Gardner, Sam
Title: RE: Task Scheduler Put it in the registry under HKLM\Software\Microsoft\Windows\CurrentVersion\Run Sam Gardner GTO Application Development Keefe, Bruyette & Woods, Inc. 212-887-6753 -Original Message- From: Erich Beyrent [mailto:[EMAIL PROTECTED]] Sent: Monday, Ja

RE: a question for split function in perl

2004-12-01 Thread Gardner, Sam
Title: RE: a question for split function in perl pretty easy. . . Just add the colon to the character class. . . $line = "fordGID=54097"; $line2 = "fordGID:54097"; ($match,$data)=split(/[=:]/,$line); print "line 1 is $match, $data"; ($match,$data)=split(/[=:]/,$line); print "line 2 is $match

RE: checking that patches have been installed

2004-11-29 Thread Gardner, Sam
Title: RE: checking that patches have been installed The question's a bit vague.  What kind of patch?  Windows? Sam Gardner GTO Application Development Keefe, Bruyette & Woods, Inc. 212-887-6753 -Original Message- From: Tfbsr Bertrand [mailto:[EMAIL PROTECTED]] Sent: Mon

DBI/email not dying right

2004-11-17 Thread Gardner, Sam
Title: Message For some reason, my script (below) isn't dying appropriately (instead, it's just hanging and not returning to the prompt).  I changed server/database/etc.  The script had formerly also printed out the die message (before I put in the finish and disconnect statements), but stil

RE: A regular expression question

2004-11-11 Thread Gardner, Sam
Title: Message or even. . .   $string = "sct-1.62-1";print "$1\n" if ($string =~ /^.+-(.+)-.+$/);   (no need to use the backslash escape for the dashes; they're not part of a character class. . .     Sam Gardner GTO Application Development

RE: LWP help

2004-10-28 Thread Gardner, Sam
3 -Original Message-From: Lasher, Brian [mailto:[EMAIL PROTECTED] Sent: Thursday, October 28, 2004 11:53 AMTo: Gardner, Sam; Perl-Win32-UsersSubject: RE: LWP help Lwp_example.pl is script.  STATFILE is output.  I changed the "proxy server" info to prot

RE: LWP help

2004-10-26 Thread Gardner, Sam
Title: Message Kind of hard to tell, w/o seeing the script or knowing what page it is. . .     Sam Gardner GTO Application Development Keefe, Bruyette & Woods, Inc. 212-887-6753 -Original Message-From: Lasher, B

RE: simple regex question

2004-10-15 Thread Gardner, Sam
Title: RE: simple regex question Well, just as a basic note, you are aware that the "." in regexes matches ANY character (except a newline, in most situations), right?  But also, you seem to have put ^. Inside a character class, so it won't be "beginning of the string, and then any character",