RE: Program to scan dictionary for words with letters in a particul ar set?

2004-05-28 Thread McMahon, Chris
List::Compare. http://search.cpan.org/search?query=list-compare&mode=all -Chris -Original Message- From: Jim Witte [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 10:15 PM To: [EMAIL PROTECTED] Subject: Program to scan dictionary for words with letters in a particular set? Gi

Use PAR instead. RE: Perl2exe

2004-05-20 Thread McMahon, Chris
-Original Message- From: Manish U [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 19, 2004 11:11 PM To: Beginners Subject: Perl2exe Hi, Can any one give me the url where i can get a free version of perl2exe. Regards Manish U ### PAR is on CPAN. The documen

SOLVED. RE: Another simple DBI question: INSERT a NULL (MSODBC)?

2004-05-06 Thread McMahon, Chris
Actually needs the text "NULL". "undef" doesn't work. Apologies-- I hope somebody else needs this information someday. -Chris -Original Message- From: McMahon, Chris Sent: Wednesday, May 05, 2004 2:23 PM To: [EMAIL PROTECTED] Subject: Another simp

Another simple DBI question: INSERT a NULL (MSODBC)?

2004-05-06 Thread McMahon, Chris
Hello again... I'm getting the hang of this, but now: $sql = qq{INSERT INTO table VALUES ($port,333,,,0); $sth = $dbh->prepare($sql) or die "Could not prepare $sql\n"; $sth->execute() or die "Could not execute $sql\n"; ...fails with "Incorrect syntax near ','" error, b

Simple DBI question

2004-05-05 Thread McMahon, Chris
Hello... My first DBI script was simply an inventory of columns in tables. Now I'm struggling with my second DBI script, and finding the CPAN docs tough going. Can anyone suggest DBI syntax to capture the result of SELECT DISTINCT column1 FROM table WHERE column2= -1

RE: starting perl

2004-05-03 Thread McMahon, Chris
I am a beginner here with learning perl. I have downloaded a perl program that also came with apache and the installer to install t hem. But when I try and run the hello world program in dos it dose not work. I am getting an error that it could not be found. anyone have any idea what I could ha

RE: book suggestion for atypical beginner

2004-04-07 Thread McMahon, Chris
I've got some > familiarity with other languages -- I've had to learn to read simple > C/C++, Java, and assembly language code (movl.org, anyone?) -- but no > significant experience doing programming. > > So...what book(s) would you suggest for the relative newbie > with a clue? I st

RE: Fuzzy string matching

2004-03-25 Thread McMahon, Chris
Hi Juman... > -Original Message- > From: juman [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 24, 2004 3:31 AM > To: [EMAIL PROTECTED] > Subject: Fuzzy string matching > > > I have two strings I want to compare doing some kind of fuzzy > matching? > Is there some good way to that

RE: Port Status Command in Perl

2004-03-23 Thread McMahon, Chris
There are any number of modules on CPAN that might help you accomplish that, like maybe http://search.cpan.org/~tscanlan/NetworkInfo-Discovery-0.12/lib/NetworkI nfo/Discovery/Scan.pm or it's brethren. Or roll your own with IO::Socket. I recommend search.cpan.org. But dependi

Now with actual code... RE: "perl -i..." reminder?

2004-03-19 Thread McMahon, Chris
Thanks Luke... > > Programming Perl, 3rd ed page 1034 index: inplace edit, page > 495 and 665 > That helped, and I found a Merlyn post on perlmonks, see below, which turned out to be a little too magical for me. So the code below is working, but parts of it still look strange to me,

"perl -i..." reminder?

2004-03-19 Thread McMahon, Chris
Hello... I need to add some boilerplate text to the very top of about 17,000 files. I can get to the files easily enough (File::Find), but there's a special syntax to edit a file in place, and it's not specified in Programming Perl, and it's a tough search on Google and PerlMonks.

RE: YA Win32::ODBC question: script hangs on 16th table.

2004-02-20 Thread McMahon, Chris
> > > Hello... > > I'm leaving aside the NULL issue for the moment... > > Is that wise ? :-) > Well, I think it's about to become immaterial... > Define 'quits'. Does it 'die'? An error? What is the $? value (oh > sorry, > you are in windows). Yah. Too b

Memory problem? Threads problem? RE: YA Win32::ODBC question: s cript hangs on 16th table.

2004-02-19 Thread McMahon, Chris
More error diagnosis below: > Hello... > I'm leaving aside the NULL issue for the moment... > Today's project is to get a complete list of column > names for each > table in the database, and the value for the first record > (row) in each > table. This code does the right thin

YA Win32::ODBC question: script hangs on 16th table.

2004-02-19 Thread McMahon, Chris
Hello... I'm leaving aside the NULL issue for the moment... Today's project is to get a complete list of column names for each table in the database, and the value for the first record (row) in each table. This code does the right thing for 15 tables and then hangs and quits wit

Getting "uninitialized value" error msg., don't know why (Win32:: ODBC)

2004-02-18 Thread McMahon, Chris
Hello... This script: *** use warnings; use Win32:ODBC; my $db = new Win32::ODBC("TheDB"); $db->Sql("SELECT * FROM dbo.foo"); $db->FetchRow(); my @values = $db->Data; print @values; * Yields two "Use of uniniti

For NULL values. RE: Getting "uninitialized value" error msg., d on't know why (Win32::ODBC)

2004-02-18 Thread McMahon, Chris
> > Hello... > This script: > *** > use warnings; > use Win32:ODBC; > my $db = new Win32::ODBC("TheDB"); > > $db->Sql("SELECT * FROM dbo.foo"); > $db->FetchRow(); > my @values = $db->Data; > print @values; > * > Yields tw

Knowledge of Win32::SAM aka SAMIE?

2004-02-05 Thread McMahon, Chris
Hello... I've just started playing with a Perl driver/automator for Internet Explorer called SAMIE (samie.sourceforge.net). It looks pretty powerful, but the documentation is sketchy. The examples and recipes are helpful and accurate, but only address maybe a third of what SAMIE does.

RE: Remote script execution

2004-02-05 Thread McMahon, Chris
> -Original Message- > From: Thind, Aman [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 04, 2004 10:25 PM > To: [EMAIL PROTECTED] > Subject: Remote script execution > > > Hello Friends, > > I would be really grateful if someone could help me out with this. > > I want to write

RE: How to put a variable value into a text file

2004-01-26 Thread McMahon, Chris
Hi Stuart... Below was one of my first "real" scripts, that is, that folks at work use. I did mine interactively. It goes through a file of arbitrary length asking the user to change xxx values for "ComputerID=xxx" and for "Address=xxx". I think the next-to-last line is slightl

RE: Program to write code

2004-01-22 Thread McMahon, Chris
I like jEdit: www.jedit.org . It runs anywhere Java runs, is lightweight, knows syntax for most major programming languages (including Perl) out of the box, and even gets plugins written for it from weirdos like Tandem people. I got turned on to jEdit because a vendor I was wor

Simplest File::Find Was: Help with fileglob: Unix vs. Windows?

2004-01-22 Thread McMahon, Chris
:[EMAIL PROTECTED] > Sent: Wednesday, January 21, 2004 10:55 AM > To: 'McMahon, Chris'; [EMAIL PROTECTED] > Subject: RE: Help with fileglob: Unix vs. Windows? > > > On Wednesday, January 21, 2004 10:53, McMahon, Chris queried: > > > >But this script d

Help with fileglob: Unix vs. Windows?

2004-01-21 Thread McMahon, Chris
Hello... This script works fine on Unix: #!/usr/local/bin/perl use warnings; use strict; my $dir = "/usr/home/admin"; my @files = glob ("$dir/*"); print @files; But this script doesn't do right in Windows: use warnings; use strict; my $dir = "E:\\Documents and Settings\\cmcmahon\\

Book review: Network Programming With Perl by Lincoln Stein

2004-01-21 Thread McMahon, Chris
http://www.amazon.com/exec/obidos/tg/detail/-/0201615711/qid=1074699239/sr=1 -1/ref=sr_1_1/102-8963439-4561724?v=glance&s=books Drieux and others mentioned this book a couple of weeks ago. I just got a copy and spent yesterday afternoon exploring several parts of interest. I'm impressed:

RE: sockets on an HPUX (thanks for the port scanner!)

2004-01-09 Thread McMahon, Chris
Thank you Mr. Saffioti for the port-scanning code. I have been playing with some simple network programming scripts recently and your code below is much more elegant than mine. I'll be stealing parts of it very soon! =) -Chris -Original Message- From: Goffredo Saffioti

RE: Use of FOR statement (OT and apologies)

2004-01-09 Thread McMahon, Chris
Don't forget the poetic possibilities, either. Not to mention doggerel and corruption, i.e.: "I have heard the mermaids singing foreach to foreach". "For to for" just wouldn't cut it. -Chris -Original Message- From: Rob Dixon [mailto:[EMAIL PROTECTED] Sent: Thursd

RE: [OT] Education Level

2003-12-08 Thread McMahon, Chris
Dropped out of 3 universities on 4 separate occasions (liberal arts program, not science). Was National Merit Scholar. After dropping out for the last time, spent 10 years as a bass player, waiter, and librarian. Got my first ever straight job 40 hrs/week 9-to-5 in 1997 at age 33 to wri

network programming?

2003-12-02 Thread McMahon, Chris
Hello... I'm starting to encounter a number of pretty sophisticated network thingies of all descriptions, and I'd be interested in anyone's experience writing network sniffers, drivers, test harnesses, or other frobnabulators in Perl. In particular, I just discovered IO::Socket:

RE: Can' t read all bytes from Socket

2003-12-01 Thread McMahon, Chris
I happened to be working on a TCP/IP server when this hit my desk and having Programming Perl open to the correct page, thought I might as well quote the "select..." line from the client code... select ((select(Server), $| = 1)[0]; print Server "Howdy\n"; $answer = ; from

RE: Starting Perl

2003-11-14 Thread McMahon, Chris
OK, I just can't leave this one alone, I have to know... =) You *are* the one who wrote "Learning Perl on Win32 Systems", yes? The more-or-less definitive guide to arguably the most powerful Windows scripting language around? Were you an entirely different person in 1997? Poses

RE: Starting Perl

2003-11-13 Thread McMahon, Chris
I name my Perl scripts on my FreeBSD box "something.pl" because I'm the first (and so far only, but not for long) user of a Unix-y system in an all-Windows shop, and I don't want my colleagues to be confused. Quizzicality cuts both ways... =) -Chris -Original Message-

printf? RE: help building hash on-the-fly?

2003-11-05 Thread McMahon, Chris
same number of characters? print "$MyId $file\n"; $MyId++; I just wondered why you like printf in this circumstance. -Chris -Original Message- From: Wagner, David --- Senior Programmer Analyst --- WGO [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 05, 2003

RE: help building hash on-the-fly?

2003-11-05 Thread McMahon, Chris
al Message- From: Wagner, David --- Senior Programmer Analyst --- WGO [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 05, 2003 3:36 PM To: McMahon, Chris; [EMAIL PROTECTED] Subject: RE: help building hash on-the-fly? McMahon, Chris wrote: > Hello... > This is probab

help building hash on-the-fly?

2003-11-05 Thread McMahon, Chris
Hello... This is probably a very simple question, but I don't have much experience using hashes... I have a simple program that lists all of the files on a directory: @files = ; foreach $file (@files) { print "$file\n"; } which prints so

RE: finding out my IP address..

2003-10-30 Thread McMahon, Chris
I faced this just a couple of days ago on a FreeBSD system for em0. Here's what I did: ($in, $myip, $rest) = split / /,qx/ifconfig|grep 192.168/; print "This IP is $myip\n"; I used the FreeBSD "ifconfig" system call and parsed the output with split. Whatever system you're o

Success! RE: No dice;details . RE: run in background from qx// ?

2003-10-24 Thread McMahon, Chris
Thank you Stefan, that works fine! The camel book is not at all clear for system/exec syntax... -C -Original Message- From: Stefan Lidman [mailto:[EMAIL PROTECTED] Sent: Thursday, October 23, 2003 2:43 PM To: [EMAIL PROTECTED] Subject: Re: No dice;details . RE: run in backgro

No dice;details . RE: run in background from qx//?

2003-10-23 Thread McMahon, Chris
Stefan... The line I'm trying to execute looks like: "/dir/dir2/program -a -a -B 5000 -c $var1 -d value $var2&" I'm trying to do this with 'system' and failing. How would you parse this run line for 'system' to execute? -Chris -Original Message- From

run in background from qx//?

2003-10-23 Thread McMahon, Chris
Hi... This should be easy, but I can't seem to do it. I'm trying to launch an external process from a Perl script to run in the background on a FreeBSD system. The process starts fine, but won't run in the background. I've tried: qx/ &/ qx/ \&/

help with Very Small Perl?

2003-10-22 Thread McMahon, Chris
Hello... I am booting a FreeBSD system from the network via PXE. On that FreeBSD system is Perl 5.005. I want to use the IO::Socket::INET module in a script on that system. (But I'd settle for Socket.pm) The kicker is that the entire root filesystem must be less than 50 megs. The other kic

win32 percent CPU used?

2003-10-16 Thread McMahon, Chris
Hello... Is there a Perl way to record the load on the CPU in a Win32 system? Win32::SystemInfo does a good job with memory, but not with CPU load. Any pointers would be welcome... -Chris

RE: Getting started in Perl for OSX

2003-10-01 Thread McMahon, Chris
Hi Deborah... From a terminal prompt, do "which perl". If you get back something like "/usr/bin/perl", you're in business. But Perl doesn't come with OSX by default. You may or may not have an install CD called "Developer Tools" or some such, and Perl is on that. If you don't