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
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
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
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-
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"
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
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,
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
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
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
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.
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
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
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
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
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
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
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
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
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
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
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
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
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",
24 matches
Mail list logo