Re: test presence of hash key with regexp?

2001-08-24 Thread M.W. Koskamp
That's too much there... /add_\w+/ and print(Yippie!\n), last while $_ = each %hash; scalar each is underutilized. :) what happened to grep? print found it if grep{$_ =~ /foo/}keys %bar If find this more readable, allthough Randall's solution is more efficient. Maarten.

Re: PERL IS NOT A HIGH LEVEL LANGUAGE

2001-08-17 Thread M.W. Koskamp
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: Jon Acierto [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, August 17, 2001 8:13 PM Subject: Re: PERL IS NOT A HIGH LEVEL LANGUAGE This thread is quite curious to me. Perl in most respects is a *higher* level

Re: XML::Parser -- Problem with undefined entities in element attributes

2001-08-15 Thread M.W. Koskamp
- Original Message - From: KAVANAGH, Michael [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 15, 2001 12:28 PM Subject: XML::Parser -- Problem with undefined entities in element attributes Hi there, I've been bumping my head up against this problem all morning now,

Re: if in a list

2001-07-26 Thread M.W. Koskamp
- Original Message - From: Brett W. McCoy [EMAIL PROTECTED] To: Jennifer Pan [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, July 26, 2001 9:12 PM Subject: Re: if in a list [...] Here's how I would code this: foreach (@mylist) { $boolean = ($_ eq 'AF1') ? 1 : 0; }

Re: Unix syntax

2001-07-24 Thread M.W. Koskamp
- Original Message - From: Sparkle Williams [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 24, 2001 2:43 PM Subject: Unix syntax I wrote a program running off a Windows NT platform and was trying to convert it to a UNIX platform. My problem comes with my syntax. I keep

Re: Snippet to list both directories and files to an array or...?

2001-07-20 Thread M.W. Koskamp
- Original Message - From: Bob Bondi [EMAIL PROTECTED] To: Beginners-perl [EMAIL PROTECTED] Sent: Friday, July 20, 2001 11:49 PM Subject: Snippet to list both directories and files to an array or...? I've been trying to use opendir($tempdir,@ARGV[0]) or die Couldn't open the

Re: perl / php question

2001-07-10 Thread M.W. Koskamp
- Original Message - From: Bob Mangold [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 09, 2001 7:43 PM Subject: perl / php question Hello, I'm not sure if anyone here can help me with this, but at least some direction in where to to look would be great. I'm using a

Re: Module to Parse MIME-encoded Email?

2001-07-08 Thread M.W. Koskamp
- Original Message - From: Mike Miller [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, July 07, 2001 6:08 PM Subject: Module to Parse MIME-encoded Email? Gurus: As a learning exercise I'm writing my own web-based POP3 client, and wish to be able to handle emails which are

Re: How is this doing what I want it too?

2001-06-30 Thread M.W. Koskamp
for ($i=0; $b[$i] != undef; $i++) { print STDOUT $b[$i]; } and that seem logical but I was getting complaints such as.. Argument #stopped at 867\n isn't numeric in ne at ./page57_1.pl line 9, FILEIN chunk 1544. anyhow hope you can enlighten me as to all this hullaballooo ;-) The

Re: Problem with hash value

2001-06-29 Thread M.W. Koskamp
- Original Message - From: Wang, Lanbo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, June 30, 2001 12:04 AM Subject: Problem with hash value Hi Members, It seemed that a value was incorrectly retrieved from the hash list in the following small Perl script. .

Re: if then else

2001-06-09 Thread M.W. Koskamp
- Original Message - From: Jeff Yoak [EMAIL PROTECTED] To: Luinrandir Hernson [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Saturday, June 09, 2001 12:10 AM Subject: Re: if then else At 05:35 PM 6/8/01 -0400, Luinrandir Hernson wrote: ok, where did i go wrong now??? '=' is the

Re: Substitution Problem

2001-06-08 Thread M.W. Koskamp
-Original Message- From: Mark Martin [mailto:[EMAIL PROTECTED]] Sent: Friday, June 08, 2001 10:01 To: [EMAIL PROTECTED] Subject: Substitution Problem Hi, I'm taking in a csv file and splitting it. One of the fields(doc) could possibly have six spaces which will disrupt the

Re: Fwd: 'use' question

2001-06-05 Thread M.W. Koskamp
- Original Message - From: Bob Mangold [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 05, 2001 9:28 PM Subject: Re: Fwd: 'use' question ok sorry for the lack of a script before, here is a little test script i wrote to try to figure out how to use the Getopt::Std

Re: Fwd: 'use' question

2001-06-05 Thread M.W. Koskamp
- Original Message - From: Timothy Kimball [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 05, 2001 9:45 PM Subject: Re: Fwd: 'use' question M.W. Koskamp wrote: : You are missing a semi-colon at the end of line 1 : after the #!/usr/local/bin/perl You don't

Re: append a file to another file

2001-06-01 Thread M.W. Koskamp
- Original Message - From: Nichole Bialczyk [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 01, 2001 9:30 PM Subject: append a file to another file i understand how to open and create files, but let's say that i want to open several files and insert them all into one large

Re: DB

2001-05-25 Thread M.W. Koskamp
- Original Message - From: justin todd [EMAIL PROTECTED] To: Beginners (E-mail) [EMAIL PROTECTED] Sent: Friday, May 25, 2001 10:18 AM Subject: DB Hi. (...) In short: Your webserver doesn't connect to your DB server. Basically this had nothing to do with the NT Domain trusting another

Re: mail

2001-05-23 Thread M.W. Koskamp
- Original Message - From: Yacketta,Ronald J [EMAIL PROTECTED] To: Beginners (E-mail) [EMAIL PROTECTED] Sent: Wednesday, May 23, 2001 10:52 PM Subject: mail Folks, I search CPAN and found a good deal of Mail packages, seeing that I am frankly new which of them would you

Re: Sendmail

2001-05-22 Thread M.W. Koskamp
- Original Message - From: Chris Tunnell [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, May 22, 2001 11:23 PM Subject: Sendmail I use a program called activeperl to run perl scripts on my W2k machine. Does anyone know where the sendmail is located Yes, on the nearest unix

Re: Sorting a Two Dimensional Array

2001-05-16 Thread M.W. Koskamp
- Original Message - From: Matt Noel [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 16, 2001 7:05 PM Subject: Sorting a Two Dimensional Array (...) I have a simple two-dimensional array, call it @Weights. I think of the first index as being the Row index and the second

Re: Oracle Database...

2001-05-15 Thread M.W. Koskamp
- Original Message - From: Ang Sei Heng [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, May 15, 2001 7:18 PM Subject: Oracle Database... Hello Everyone, Recently I did some database connection to Oracle via DBD::Oracle. I manage to conncec to server, the follow statement

Re: Regexp Question Again

2001-05-11 Thread M.W. Koskamp
- Original Message - From: Gross, Stephan [EMAIL PROTECTED] To: 'Beginner Perl' [EMAIL PROTECTED] Sent: Friday, May 11, 2001 5:26 PM Subject: Regexp Question Again I wasn't clear last time. I wrote: I want to match the following: 1) the letters PT 2) a space or nothing 3) a word

Re: Need help on Unicode Programming...

2001-05-08 Thread M.W. Koskamp
- Original Message - From: Ang Sei Heng [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 09, 2001 1:27 AM Subject: Need help on Unicode Programming... This is what I did: -- BEGIN - #!/usr/bin/perl -w use Unicode::Map8; use Unicode::String;

Re: db connect

2001-05-07 Thread M.W. Koskamp
- Original Message - From: justin todd [EMAIL PROTECTED] To: Beginners (E-mail) [EMAIL PROTECTED] Sent: Monday, May 07, 2001 6:30 PM Subject: db connect Hi Folks I am running a IIS server and MSSQL7, both on the same machine. The database server is called JUSTIN. The database

Re: Separate DB

2001-05-04 Thread M.W. Koskamp
- Original Message - From: justin todd [EMAIL PROTECTED] To: Beginners (E-mail) [EMAIL PROTECTED] Sent: Friday, May 04, 2001 9:18 AM Subject: Separate DB Hi all. I am running a IIS webserver and a separate MSSQL database. Could anyone please tell me what the connection string

Re: appending unique entries to a text file in perl

2001-05-04 Thread M.W. Koskamp
Here is what I have so far: open (FILE, file2) || die cannot open file2\n; open (OIDFILE, file1) || die cannot open file1\n; while (OIDFILE) { $new_oid = $_; while (FILE) { You opened FILE for output here. besides this is not too efficient, because you read the whole file2 over and over

Re: How to implement Variable variable names?

2001-05-03 Thread M.W. Koskamp
- Original Message - From: Me [EMAIL PROTECTED] To: Christodoulou Demetris [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, May 03, 2001 10:26 AM Subject: Re: How to implement Variable variable names? Hi, I am writing an application where i have to read from a file variable

Re: eliminating duplicate lines in a file

2001-05-02 Thread M.W. Koskamp
- Original Message - From: Casey West [EMAIL PROTECTED] To: M.W. Koskamp [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; cherukuwada subrahmanyam [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, May 02, 2001 6:45 PM Subject: Re: eliminating duplicate lines in a file On Wed, May 02, 2001

Re: I am a real begginer to perl......

2001-05-02 Thread M.W. Koskamp
Programming the perl DBI would be a good book. Also learning perl from O'reilly is fairly good. If you get perl from activestate.com you get the perl documentation in html format. Very good and worth reading. Try read the different tutorials. I suggest perlsyn, perlop, and perl sub. Also make a

Re: String deconstruction?

2001-05-02 Thread M.W. Koskamp
print join \n, split , abcdefg; split will give you a list where abcdefg is splitted on nothing. so it will contain (a,b,c,d,e,f,g). Join \n will join the items in the list with newlines between em. So it will print: a b c d e f If you want to reuse the array do this: my @chars = split ,

Re: String deconstruction?

2001-05-02 Thread M.W. Koskamp
- Original Message - From: David H. Adler [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 02, 2001 8:46 PM Subject: Re: String deconstruction? On Wed, May 02, 2001 at 11:28:14AM -0700, Ross Larner wrote: Hello. I am attempting to print a string one character at a time.

Re: missing something obvious

2001-04-25 Thread M.W. Koskamp
- Original Message - From: Paul Johnson [EMAIL PROTECTED] To: Sean O'Leary [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, April 25, 2001 7:07 PM Subject: Re: missing something obvious On Wed, Apr 25, 2001 at 12:47:59PM -0400, Sean O'Leary wrote: split (., $ARGV[0])

Re: [beginner] file parsing question

2001-04-24 Thread M.W. Koskamp
- Original Message - From: Stout, Joel R [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, April 24, 2001 10:20 PM Subject: [beginner] file parsing question Sorry so lengthy but here goes: I am a Perl newbie and trying to parse a file. Depending on the tags in the data I want

Re: How to send attacments

2001-04-24 Thread M.W. Koskamp
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, April 22, 2001 12:28 AM Subject: How to send attacments How do i send an html file as an attachment using sendmail? Thanks Take a look at the MIME::Lite module...

Re: Parsing newbie

2001-04-22 Thread M.W. Koskamp
- Original Message - From: Pang, Joseph [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, April 21, 2001 12:30 AM Subject: Parsing newbie Is there any lib/module I could use for data parsing? I has some data format that the grammar is known (quite simple actually), but I