Re: DBI question (again)

2001-08-02 Thread Ray Barker
>Extracted from the perl cookbook > >use DBI; > >$dbh = DBI->connect('DBI:driver:database', 'username', 'auth', >{ RaiseError => 1, AutoCommit => 1}); >$dbh->do($SQL); >$sth = $dbh->prepare($SQL); >$sth->execute(); >while (@row = $sth->fetchrow_array) { ># ... >} >$sth->finish();

Re: DBI question (again)

2001-08-02 Thread Elie De Brauwer
> good info on using the DBI module (should take you right to prepare): > http://theoryx5.uwinnipeg.ca/CPAN/data/DBI/DBI.html#prepare > > There is also a good O'Reilly book titled "Using the Perl DBI" (or > something like that) by Alligator Descartes > I know of the existence of that book but t

Extended patterns

2001-08-02 Thread baby lakshmi
Hi I really dont understand what is the difference between the patterns and extended patters.. i think both are doin the same function. But why they called as extended?? Help pointers in this regard will be really helpful. Thank you Regards Babylakshmi M ___

inserting lines

2001-08-02 Thread COLLINEAU Franck FTRD/DMI/TAM
Hi! How can i do to insert several lines in the beginning of a existant file ? Thanks Franck -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: DBI question (again)

2001-08-02 Thread Robert Graham
Have a look a the "Short Guide to DBI" available at perl.com It has an example with queries. http://www.perl.com/lpt/a/1999/10/DBI.html Regards Robert - Original Message - From: "Elie De Brauwer" <[EMAIL PROTECTED]> To: "Ray Barker" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursda

RE: inserting lines

2001-08-02 Thread John Edwards
$orginalFile = "c:\\file.txt"; $newFile = "c:\\newfile.txt"; $textToAdd = "New text\nSecond line ofnew text\n"; open IN, $originalFile or die "Can't open $originalFile: $!"; open OUT, ">$newFile" or die "Can't create $newFile: $!"; print OUT $textToAdd; while() {print OUT}; close IN; close OU

perl debugger

2001-08-02 Thread Ruth Albocher
hi all. Is there any good stable graphic debugger for perl? thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Problems - File Uploading and creation date

2001-08-02 Thread Rajeev Rumale
Dear firends, I have situation were user can upload a file to our web base application. The problem is with the date of creation. When ever a new file is uploaded, I need to first check of the file with same name exists. If it exist then i need to check if it is newer than the file being uploade

Re: AW: y me

2001-08-02 Thread Brent Michalski
Yeah, I read more after I sent the mail... I was thinking that the program didn't produce any output rather than the cgiwrap error. Oh well, i guess i'll read the whole problem next time before sending email brent

RE: Valid DB Handle Assertion Test

2001-08-02 Thread Bob Showalter
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Thursday, August 02, 2001 9:44 AM > To: [EMAIL PROTECTED] > Subject: Valid DB Handle Assertion Test > > > > Can I test for the existence of a method without actually calling it? I don't know. Maybe, but s

Re: Where is DB_File::Lock module?

2001-08-02 Thread Abdulaziz Ghuloum
Hello, It's on cpan: http://search.cpan.org/search?dist=DB_File-Lock Hope this helps,,, Aziz,,, In article <[EMAIL PROTECTED]>, "Carlos C . Gonzalez" <[EMAIL PROTECTED]> wrote: > Hi everyone, > > I am going absolutely nuts trying to find where to get the DB_File::Lock > module. I have look

number of line

2001-08-02 Thread COLLINEAU Franck FTRD/DMI/TAM
Hi! I would like to store the number of a line whitch corresponds to a string. How can i do ? Thanks FRanck -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Confusion with hash reference and Mail::IMAPClient

2001-08-02 Thread Chris Rogers
I am using the Mail::IMAPClient module and the extension BodyStructure to connect to Exchange Server 5.5. Everything seems to be working great ( I love this module ) except for one thing. When I use the BodyStructure extension, either nothing is being returned in the object or I don't know how to

Re: inserting lines

2001-08-02 Thread Paul
--- COLLINEAU Franck FTRD/DMI/TAM <[EMAIL PROTECTED]> wrote: > Hi! > > How can i do to insert several lines in the beginning of a existant > file ? > > Thanks > > Franck > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > _

Re: Valid DB Handle Assertion Test

2001-08-02 Thread JCervoni
It appears that the only kind of assertion test I could do would be to test $dbh like this if ( !defined($dbh) || $dbh eq '' ) { print "dbh is invalid\n" ; exit 1 } Jeff > Can I test for the existence of a method without actually calling it? > > Basically what I'm trying to

RE: shared hash - how ?

2001-08-02 Thread Brian
Somebody on the mod_perl mailing list might be able to help you better than somebody on the begginers perl list. This is a bit OT (okay, it's way out in left field. If you go to http://perl.apache.com you can sign up for the list. #!/usr/bin/Brian Johnson $job= "Laziness"; $pay=

Certification

2001-08-02 Thread Shepard, Gregory R
I was looking online for information on Perl Certification but only found people discussing it, and not where to get it. Is certification available? And who provides the most valid certification? Thanks! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PRO

Re: File Handling question - easy

2001-08-02 Thread Michael Fowler
On Thu, Aug 02, 2001 at 11:03:23AM -0700, Jon wrote: > My problem is, I want to do this for a bunch of different patterns (ex. > ".txt", ".this", ".that"). You could say <*.txt *.this *.that>, or you can use opendir, readdir, and a regex (perhaps grep). > How can I make what is inside the angl

Re: Putting results of find into an array

2001-08-02 Thread Michael Fowler
On Wed, Aug 01, 2001 at 10:08:13AM -0700, Greg Tomczyk wrote: > > Thank you for the response. I must confess that I have been reading the > Perldocs, but I am having some logic troubles, difficult to understand how > to use File::Find. I tried using the push routine, but that listed all > files

Re: regular expression

2001-08-02 Thread Jeff 'japhy/Marillion' Pinyan
On Aug 2, Messervy, Joe M said: >I want to get rid of machine1, machine2, and machine4 as there were no >matching logs for these events. >I tried as a test perl -p -i -e 's//nmachine//g' myfile and get the >following error: >Illegal division by zero at -e line 1, <> line 1. (and all data is los

Re: memory for implied array/list read

2001-08-02 Thread Michael Fowler
On Thu, Aug 02, 2001 at 03:46:22PM -0400, Jeff 'japhy/Marillion' Pinyan wrote: > On Aug 2, Michael Fowler said: > > >You can only print a string. When print is given multiple arguments it > >joins them with $" before printing. This is documented in perldoc -f print. > > *Cough* $, not $". > >

Re: Certification

2001-08-02 Thread Jeff 'japhy/Marillion' Pinyan
On Aug 2, Paul said: >That would be Merlyn (Randall Schwartz) &co. at Stonehenge, >if you want to call it that. >But it isn't a certification, I don't think. > >Randall? chop(), if'n you don't mind. ;) -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia b

Re: Valid DB Handle Assertion Test

2001-08-02 Thread JCervoni
I wrote a module called DBIv that does a 'use DBI ; '. These are the functions that I defined. This module was written with the intention of providing 2 things: - a very simple interface - database independence -- Connection Functions:

RE: Certification

2001-08-02 Thread Brett W. McCoy
On Thu, 2 Aug 2001, Shepard, Gregory R wrote: > Thanks for suggesting the Stonehenge training. That appears to be the best > route. > And I understand Larry's feeling regarding certification. As long as you can > do it, who needs certification? But, of course, its nice to have a little > framed s

RE: File Handling question - easy

2001-08-02 Thread Bob Showalter
> -Original Message- > From: Jon [mailto:[EMAIL PROTECTED]] > Sent: Thursday, August 02, 2001 2:03 PM > To: [EMAIL PROTECTED] > Subject: File Handling question - easy > > > I don't know if I sent my first email correctly. Sorry for > the repeat if I > did, I'm new :) > > Hello, > The

RE: Help with Net::Telnet module

2001-08-02 Thread Bob Showalter
> -Original Message- > From: S. Johnson [mailto:[EMAIL PROTECTED]] > Sent: Thursday, August 02, 2001 5:05 PM > To: [EMAIL PROTECTED] > Subject: Help with Net::Telnet module > > > I am looking for some help debugging a problem with the > Net::Telnet module > written by Jay Rogers. > > H

Valid DB Handle Assertion Test

2001-08-02 Thread JCervoni
Can I test for the existence of a method without actually calling it? Basically what I'm trying to do is to verify that $dbh is still a valid handle. I want to use this as an assertion test at the start of a function. # verify that the $dbh is valid if ( !defined($dbh->disconnect() ) ) {

Weekly list FAQ posting

2001-08-02 Thread casey
NAME beginners-faq - FAQ for the beginners mailing list 1 - Administriva 1.1 - I'm not subscribed - how do I subscribe? Send mail to <[EMAIL PROTECTED]> You can also specify your subscription email address by sending email to (assuming [EMAIL PROTECTED] is your email address)

Re: memory for implied array/list read

2001-08-02 Thread Michael Fowler
On Thu, Aug 02, 2001 at 09:20:43AM -0700, Paul wrote: > print ; > > If IN is accessing a large file, does the second syntax try to slurp > the whole thing into memory before printing it? Or is there some > internal optimization that doles it through in bufferloads? AFAIK, print is not special

RE: input output append

2001-08-02 Thread Shepard, Gregory R
Try $Directory= $file="$directory.$file.txt"; # don't forget to add "\" between dir and file open FH, ">$file" or die "Cannot open $file:$!"; print FH "blah \n"; print FH ""blah \n"; print FH ""blah \n"; close FH; -Original

RE: input output append

2001-08-02 Thread Bob Showalter
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Thursday, August 02, 2001 5:10 PM > To: [EMAIL PROTECTED] > Subject: input output append > > > HI, > anyone knows the right syntax for reading and writing > (appending) to a file. I assume you mean "open

Networking problem: can't connect via sockets

2001-08-02 Thread Brett R. Gordon
Hi! This is the ezmlm program. I'm managing the [EMAIL PROTECTED] mailing list. I'm working for my owner, who can be reached I'm trying to created a multi-threaded server to accomplish some distributed processing. While compiling Perl with thread support, I noticed during 'make test' that io:mul

Re: Using a pipe in a split command

2001-08-02 Thread Brett W. McCoy
On Fri, 3 Aug 2001, Darren Edgerton wrote: > What i really want to do is use a variable to contain the pipe > ie > my $separator = "|"; > my @arr = split(/$separator/,$somevar); > > Now: > $arr[0] = "h" > $arr[1] = "e" > > How do i get the split command to use $separat

Where is DB_File::Lock module?

2001-08-02 Thread Carlos C . Gonzalez
Hi everyone, I am going absolutely nuts trying to find where to get the DB_File::Lock module. I have looked all over CPAN, have done searches on Google.com and while there is some info on it I can't find out where to download it. Does anyone have any suggestions? -- Carlos www.internetsuc

RE: Where is DB_File::Lock module?

2001-08-02 Thread Bob Showalter
> -Original Message- > From: Carlos C.Gonzalez [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 01, 2001 7:35 PM > To: [EMAIL PROTECTED] > Subject: Where is DB_File::Lock module? > > > Hi everyone, > > I am going absolutely nuts trying to find where to get the > DB_File::Lock > mo

Re: boolean logic - what am I doing wrong?

2001-08-02 Thread Paul
--- Ron Woodall <[EMAIL PROTECTED]> wrote: > Hi All: Hi, Ron. > A bit of a conundrum here. Reformatting (forgive if offensive): > while (attlist[$x] =~ m|

Re: File Handling question - easy

2001-08-02 Thread Jon
Bob-Mike-Jerry, Thanks guys Jon At 01:36 PM 8/2/01 -0500, Jerry Preston wrote: >Jon, > >Read all the files in the directory then go through them based on the >file ext >and do what you want. > > opendir( PROGRAM, "./" ); > foreach $program ( readdir( PROGRAM )) { > if( $program =~ ".txt"

Re: boolean logic - what am I doing wrong?

2001-08-02 Thread Michael Fowler
On Thu, Aug 02, 2001 at 12:51:55PM -0400, Ron Woodall wrote: > Hi All: > > A bit of a conundrum here. > > while (attlist[$x] =~ m|

Re: File Handling question - easy

2001-08-02 Thread Jerry Preston
Jon, Read all the files in the directory then go through them based on the file ext and do what you want. opendir( PROGRAM, "./" ); foreach $program ( readdir( PROGRAM )) { if( $program =~ ".txt" ) { ### do stuff, given a filename }elsif( $program =~ ".this" ) { ### do stuff, given

Re: memory for implied array/list read

2001-08-02 Thread Jeff 'japhy/Marillion' Pinyan
On Aug 2, Michael Fowler said: >You can only print a string. When print is given multiple arguments it >joins them with $" before printing. This is documented in perldoc -f print. *Cough* $, not $". $" is used when you put an array (or array slice) in double quotes. And, upon checking the

RE: zipping files with Active State Perl

2001-08-02 Thread Tim Noll
For most purposes, I've found it much easier to just make a system call to an external program rather than using a Perl module. I've messed with Compress::Zlib a bit, which is a standard module, but it seemed to be overkill for what I needed. For example, if you have WinZip on your box, you can a

Re:[apology]inserting lines

2001-08-02 Thread Paul
--- Paul <[EMAIL PROTECTED]> wrote: Sorry for the null-mail, ladies and gents. I apparently hit the wrong button and sent a quoted response to the list without adding anything to it. I apologize for wasting your time, mailbox space, and bandwidth. =o) Now, since I did so: > --- COLLINEAU Franc

Re: File Handling question - easy

2001-08-02 Thread Michael Fowler
On Thu, Aug 02, 2001 at 02:31:28PM -0400, Bob Showalter wrote: > P.S. I'm surprised this works with while(). I didn't realize fileglobs > were magical inside while(), but it appears they are... Is this documented? Yes, perldoc perlop, in the I/O Operators section (5.6.1 version): A (file)g

RE: File Handling question - easy

2001-08-02 Thread Jon
Bob, I got it from "Perl Black Book" by S. Holzner, section on globs. Very very good book to learn Perl from, extremely easy to read, excellent for beginners and I'm not going to know this for a long while but I think it is an excellent book for intermediate Perl dudes too. End of section rea

Pipe to a command

2001-08-02 Thread Hal Wigoda
How do you run a command on a unix box from a perl script and capture the results?? Like a grep command?? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: boolean logic - what am I doing wrong?

2001-08-02 Thread Adam Turoff
On Thu, Aug 02, 2001 at 12:51:55PM -0400, Ron Woodall wrote: > Hi All: > > A bit of a conundrum here. > > while (attlist[$x] =~ m|

RE: Valid DB Handle Assertion Test

2001-08-02 Thread JCervoni
> Another approach is to wrap the disconnect in eval, which lets you capture > the error rather than having it stop your program: > > eval { $dbh->disconnect(); }; > > If $dbh is not a database handle, the relevant error message will be in $@. > > perldoc -f eval > > I think the eval method i

Re: Fun With Perl list ???? where is it ? :)

2001-08-02 Thread Silvio Luis Leite Santana
OK, officially too :) 2.3 - Are there any rules? Yes. As with most communities, there are rules. Not many, and ones that shouldn't need to be mentioned, but they are. Be nice No flaming Have fun Silvio Luis Leite Santana wrote: > > Hi all > Is there actually a Fun With Perl