[ADMIN - REDIRECT] Re: CGI script problem

2002-08-19 Thread Kevin Meltzer
This message is being redirected to the beginners-cgi list. Please answer on that list, and to the original poster. Thanks. Cheers, Kevin On Mon, Aug 19, 2002 at 04:11:14PM +0100, Matt Wetherill ([EMAIL PROTECTED]) said something similar to: Hi list, I'm just trying to get started with cgi

Re: CGI script problem

2002-08-19 Thread Connie Chan
[...] print Content-type: text/plain\n\n; [...] Try print Content-type: text/html\n\n instead of text/plain\n\n; Rgds, Connie -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Can't locate loadable object DBD::mysql in @INC

2002-08-19 Thread root
to force @INC to look at the directory of your DBI library, use: use lib your DBI directory along the top of your script david -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Can't locate loadable object DBD::mysql in @INC

2002-08-19 Thread Connie Chan
or can try push @INC, 'the/path/you/want'; Rgds, Connie - Original Message - From: root [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 20, 2002 2:19 AM Subject: Re: Can't locate loadable object DBD::mysql in @INC to force @INC to look at the directory of your DBI

Re: Can't locate loadable object DBD::mysql in @INC

2002-08-19 Thread David Zhuo
push @INC, 'the/path/you/want' is different than: use lib 'the/path/you/want' from a user's perspective, they are the same but they are not under the hood. what happen is that that push statement is a run time statement. the use lib statement is a compile time statement. don't confuse the 2.

Re: Can't locate loadable object DBD::mysql in @INC

2002-08-19 Thread Wiggins d'Anconia
aka, use lib is like placing the push in a BEGIN blockwhich I think was the old way of doing things... David Zhuo wrote: push @INC, 'the/path/you/want' is different than: use lib 'the/path/you/want' from a user's perspective, they are the same but they are not under the hood.

Re: Can't locate loadable object DBD::mysql in @INC

2002-08-19 Thread David Zhuo
yeah. not sure what you mean by old way thought? use lib is safer and is the preferred method most of the time because you don't want your script to die mid-way during run time. you want to catch the error as soon as possible before your script even start. by the way, when i reply, how come i

Re: Can't locate loadable object DBD::mysql in @INC

2002-08-19 Thread Wiggins d'Anconia
SOrry...I was referring to the BEGIN around the push as being the old way, which is now less favored to the use lib way. Don't understand the question, though I think it probably has something to do with having to group reply?? http://danconia.org David Zhuo wrote: yeah. not sure what you

Re: Can't locate loadable object DBD::mysql in @INC

2002-08-19 Thread David Zhuo
when i hit the Reply To All button, my message is sent but it never appear in the news reader and i don't know why? i can see everyone else's message but my own posted/replied message never appear in the mailing list... david On Mon, 2002-08-19 at 15:40, Wiggins d'Anconia wrote: SOrry...I was

How to set cookies for an SHTML document?

2002-08-19 Thread Octavian Rasnita
Hi all, I have an SHTML file and I want to set cookies for it. Is this possible? I've tried to use server side includes to set a cookie using that script used as SSI but it doesn't set the cookie. The script sets the cookie if it is not included in an html file, but if it is, it doesn't want

Re: How to set cookies for an SHTML document?

2002-08-19 Thread Wiggins d'Anconia
The way I understand things, cookies must be printed before the header is returned (though this may have changed in HTTP/1.1, anyone?) In which case setting a cookie from within an SSI non-javascript is not possible. A cookie is just specifically formatted text being printed before the

Re: Can't locate loadable object DBD::mysql in @INC

2002-08-19 Thread Wiggins d'Anconia
Sounds interesting, alas don't think I can help on this one, I am using the list through normal e-mail as my ISP is disallowing news group usage temporarily. http://danconia.org David Zhuo wrote: when i hit the Reply To All button, my message is sent but it never appear in the

Re: Online installer

2002-08-19 Thread Todd Wade
Soheil Shaghaghi [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Dear Connie, Hello and thanks again :) I just wanted to show you and everyone else who is interested in this subject a much better example: http://www.iwebsupport.com/cgi-bin/dsx.cgi?app=Installer

Using a external Config file

2002-08-19 Thread Andrew BOGECHO
Sun Aug 18 20:24:03 EDT 2002 Hello fellow Perl users, I would like to know how I can setup an external config file whose variables I can then use in a perl script. For example: File Config: ** MAXLENGTH=56

Re: Using a external Config file

2002-08-19 Thread John W. Krahn
Andrew Bogecho wrote: Hello fellow Perl users, Hello, I would like to know how I can setup an external config file whose variables I can then use in a perl script. For example: File Config: ** MAXLENGTH=56

Re: Using a external Config file

2002-08-19 Thread Felix Geerinckx
on Mon, 19 Aug 2002 00:47:49 GMT, [EMAIL PROTECTED] (Andrew Bogecho) wrote: I would like to know how I can setup an external config file whose variables I can then use in a perl script. [...] I know that this can be done by setting up Config as Config.pm and get the variables with a use

Perl and Berkley DB - troubles

2002-08-19 Thread Mariusz
Hello, 1. I have installed perl (perl-5.6.1.tar.gz) 2. I have installed Berkley DB (db-4.0.14.tar.gz) 3. now, when I try to run a Perl script, it says: Checking for installation of Berkely DB or GNU DB capability... No DBM package was successfully found or installed at

Problems using glob()

2002-08-19 Thread Jochen Berger
Hi, y'all! I've got a problem with a Perl Script I wrote to find files matching a special pattern. It worked fine until I commented it. From that time on the program has got problems with that WIN32 feature called You want spaces in your file name? Then do it!. If the program finds a

RE: How does ZOMBIE/defunct affect the system?

2002-08-19 Thread Sudarshan Raghavan
On Wed, 14 Aug 2002, Bob Showalter wrote: use POSIX :sys_wait_h; #... do { $kid = waitpid(-1,WNOHANG); } until $kid == -1; Yes WNOHANG makes waitpid return

Re: Problems using glob()

2002-08-19 Thread Felix Geerinckx
on Mon, 19 Aug 2002 10:09:16 GMT, [EMAIL PROTECTED] (Jochen Berger) wrote: I've got a problem with a Perl Script I wrote to find files matching a special pattern. It worked fine until I commented it. From that time on the program has got problems with that WIN32 feature called You want

Re: what's wrong

2002-08-19 Thread Sudarshan Raghavan
On Thu, 15 Aug 2002, Priss wrote: I have amended the first few lines, this works but I wonder if this bad... Priss while () { /(\S+)/ and $seen_in_file1{$1} += 1; If the line that is being read is of the form word1 word2 $1 will only contain 'word1'. \S

CGI script problem

2002-08-19 Thread Matt Wetherill
Hi list, I'm just trying to get started with cgi (w2k, Apache 2.0.40), and have been using the sample script printenv.pl which is included with Apache: #!c:/Perl/bin/Perl.exe ## ## printenv -- demo CGI program which just prints its environment ## print Content-type: text/plain\n\n; foreach

newbie question

2002-08-19 Thread Chad Kellerman
Hello, I have only been writing perl for a few months, so forgive me if this sounds stupid. what is the difference between: $| = 1; and $|++; Or can you point me in the right direction on where I can read boutit? Thanks, Chad -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

inserting a single word in every file

2002-08-19 Thread Nandita
Hello all, I have a list of files, and need to insert a word somewhere in the middle- the files begin with a list of sequence names followed by alignments for each sequence, and i'd like to insert the header ALIGNMENTS before they begin.. Any starting ideas / pointers for me? many thanks and

Re: Using a external Config file

2002-08-19 Thread Andrew BOGECHO
Mon Aug 19 09:39:37 EDT 2002 On Mon, Aug 19, 2002 at 03:01:13AM -0700, John W. Krahn wrote: Andrew Bogecho wrote: Hello fellow Perl users, Hello, I would like to know how I can setup an external config file whose variables I can then use in a perl script. [snip]

RE: CGI script problem

2002-08-19 Thread Bob Showalter
-Original Message- From: Matt Wetherill [mailto:[EMAIL PROTECTED]] Sent: Monday, August 19, 2002 11:11 AM To: Perl beginners Subject: CGI script problem Hi list, I'm just trying to get started with cgi (w2k, Apache 2.0.40), and have been using the sample script printenv.pl

Re: CGI script problem

2002-08-19 Thread WyvernGod
In a message dated 8/19/2002 10:13:16 AM US Eastern Standard Time, [EMAIL PROTECTED] writes: http://localhost/cgi-bin/printenv.pl oh this is a stupid problem i had aswell... an easy solution is to rename the ..pl as .cgi and then it worked fine for me.. I know.. sounds dumb but IE see's

[ADMIN - REDIRECT] Re: CGI script problem

2002-08-19 Thread Kevin Meltzer
This message is being redirected to the beginners-cgi list. Please answer on that list, and to the original poster. Thanks. Cheers, Kevin On Mon, Aug 19, 2002 at 04:11:14PM +0100, Matt Wetherill ([EMAIL PROTECTED]) said something similar to: Hi list, I'm just trying to get started with cgi

Re: Perl and Berkley DB - troubles

2002-08-19 Thread Elaine -HFB- Ashton
Mariusz [[EMAIL PROTECTED]] quoth: *Hello, * *1. I have installed perl (perl-5.6.1.tar.gz) *2. I have installed Berkley DB (db-4.0.14.tar.gz) *3. now, when I try to run a Perl script, it says: * * *Checking for installation of Berkely DB or GNU DB capability... *No DBM

Weekly posting ststistics - 33/2002

2002-08-19 Thread Felix Geerinckx
Weekly posting statistics for perl.beginners - week 33 of 2002. From Monday 2002-08-12 to Sunday 2002-08-18 there were 367 articles posted (15989 lines) by 121 authors, giving an average 3.03 articles per author, and an average article length of 44 lpa. The average number of articles per day

Problems with rsh command

2002-08-19 Thread Nikola Janceski
I have posted this to XML and no response there. so maybe it's simpler than that... I have script that uses XML::Simple, which works when run via command line: /yyy/TreeInfo/tmp/gather_os_info.pl but if run it via an rsh command (on the same host for now): /bin/rsh host1

Re: Problems with rsh command

2002-08-19 Thread Tanton Gibbs
One thing you might check is your PERL5LIB environment variable when you rsh vs when you login. It could be that rsh does not run your .profile and therefore does not set up your environment variables thereby prohibiting perl from seeing the appropriate libraries. - Original Message -

RE: Problems with rsh command

2002-08-19 Thread Nikola Janceski
nope.. then it would be able to get that far. Remember I have: use XML::Simple; Which calls other modules (XML::SAX etc.) but stranger is that PurePerl.pm is in the same dir as the ParserFactory.pm. plus the onlything I have in my PERL5LIB env var is my private module dirs. I use 'use lib' all

Re: newbie question

2002-08-19 Thread Kevin Meltzer
This is actually a bug. It just seems that nobody seems to care :) It would break too many JAPHs which use this. So, don't depend on it, in case it is ever fixed. On Mon, Aug 19, 2002 at 01:17:15PM -0700, John W. Krahn ([EMAIL PROTECTED]) said something similar to: Bob Showalter wrote:

RE: Is it legal ???

2002-08-19 Thread Timothy Johnson
You can do that, but if you're planning on assigning the variables any value other than (), then you will want to put the array LAST. Otherwise I don't know if Perl will let the array suck up all of the values you try to assign. This way you can be sure that your scalars receive a value.

Re: Is it legal ???

2002-08-19 Thread Connie Chan
Maybe you can refer to use vars ( perldoc -m vars). Rgds, Connie - Original Message - From: A Taylor [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 20, 2002 4:23 AM Subject: Is it legal ??? Hi all, I am trying to declare some variables and was wondering what the

RE - is it legal

2002-08-19 Thread A Taylor
Thanks all your help has been much appreciated Anadi ^_^ You are just a dewdrop, and as you meditate the dewdrop starts slipping from the petals of the Lotus towards the ocean. When the meditation is complete, the dewdrop has disappeared into the ocean. Or you can say, the ocean has

time and date

2002-08-19 Thread A Taylor
I am trying to get the time and date that some one sends me an email. can anyone help me or point me in the right direction as how to get these in perl ??? Thanks in advance for your help - its much appreciated Anadi You are just a dewdrop, and as you meditate the dewdrop starts slipping

RE: Problems with rsh command

2002-08-19 Thread Nikola Janceski
host1 is one host. the only host that I have been testing this on. via command line it works. via rsh command line it doesn't. via rsh to command prompt, then command lining it, it works. It looks like it is differences in the env. vars. essentially when I use rsh and run a command (ie rsh host1

Re: Problems with rsh command

2002-08-19 Thread drieux
On Monday, August 19, 2002, at 12:42 , Nikola Janceski wrote: [..] but if run it via an rsh command (on the same host for now): /bin/rsh host1 /yyy/TreeInfo/tmp/gather_os_info.pl I get the following error: Can't locate object method new via package XML::SAX::PurePerl (perhaps you forgot to

Re: Problems with rsh command

2002-08-19 Thread drieux
On Monday, August 19, 2002, at 02:40 , Nikola Janceski wrote: host1 is one host. the only host that I have been testing this on. via command line it works. via rsh command line it doesn't. via rsh to command prompt, then command lining it, it works. if you do an rsh farhost you

Best way to split log

2002-08-19 Thread Matt Simonsen
I'm wondering what people would suggest as the best way to split this so it respects the and [] as fields yet doesn't kill performance? 1.2.3.4 - - [15/Aug/2002:06:43:39 -0700] GET /usr/123 HTTP/1.0 200 38586 http://www.careercast.com/js.php; Mozilla/4.0 (compatible; MSIE 5.5; Windows 98) -

Passing Hashes into a function

2002-08-19 Thread John Ross
I am trying to pass an already existing hash into a subroutine, modify that hash, and have the modifications take when I leave the subroutine. I have looked through a number of perl books, but I either don't know what I am looking for, or I just don't understand how this works. I am assuming

RE: Passing Hashes into a function

2002-08-19 Thread David . Wagner
A code snippet would be very helpful. To pass a hash and update it, then func(\%hash); sub func { my ( $hash ) = @_; $hash-{key} = 1; # this should be reflected back in the calling program when you return } Wags ;) -Original Message- From: John

Re: time and date

2002-08-19 Thread Kevin Meltzer
Hi Anadi, You want to take a look at the MIME-tools, specifically MIME::Parser and MIME::Head (look for MIME::Tools on http://search.cpan.org). If that seems too heavy duty for your needs, take a look at the Mail::* modules on the CPAN. Also look there for ways to access the mail, if you

RE: open file into hash

2002-08-19 Thread Wagner Jeff Civ Northrop Grumman/TTMS
Hi, Though this thread is now almost a week old, I thought I'd offer one more suggestion. How about using this %people = map { chomp; split } INPUT; in place of %people = INPUT; To my eyes, it is cleaner than adding an explicit loop. TMTOWTDI, Jeff -Original Message-

Re: Is it legal ???

2002-08-19 Thread John W. Krahn
A Taylor wrote: Hi all, I am trying to declare some variables and was wondering what the best way to do this was. Is it legal to do something like this: my (@pairs, $ENV, $buffer); Yes. John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Time and Date

2002-08-19 Thread A Taylor
Hi all, Thanks for your help so far - I have managed to sort out my time and date problem but there are a few points that I dont understand. The code I have used is as follows: # get the hours, mins, weekday, day, month and year $hour = (gmtime)[2]; $min = (gmtime)[1]; $wday = (qw(Sun Mon

Re: Manipulating files in a directory

2002-08-19 Thread John W. Krahn
Yanet I wrote: Hello all, Hello, I have been having a bit of trouble with a script that is very easy to develop in ksh. I am just trying to rotate logs. some of the variables I declare are: my $LOGDIR=/some/where/in/my/file/system/logdir; my

Re: newbie question

2002-08-19 Thread John W. Krahn
Kevin Meltzer wrote: On Mon, Aug 19, 2002 at 04:35:53PM -0700, John W. Krahn ([EMAIL PROTECTED]) said something similar to: Kevin Meltzer wrote: This is actually a bug. It just seems that nobody seems to care :) It would break too many JAPHs which use this. So, don't depend

Re: Time and Date

2002-08-19 Thread John W. Krahn
A Taylor wrote: Hi all, Hello, Thanks for your help so far - I have managed to sort out my time and date problem but there are a few points that I dont understand. The code I have used is as follows: # get the hours, mins, weekday, day, month and year $hour = (gmtime)[2]; $min =

Re: Manipulating files in a directory

2002-08-19 Thread drieux
On Monday, August 19, 2002, at 03:53 , Leon, Yanet I,,DMDCWEST wrote: Hello all, [..] If I get your question - it is how do I implement the standard syslog log roller in perl you will want to do perldoc -f rename you may want to check out

Re: Passing Hashes into a function

2002-08-19 Thread drieux
On Monday, August 19, 2002, at 03:08 , John Ross wrote: I am trying to pass an already existing hash into a subroutine, modify that hash, and have the modifications take when I leave the subroutine. I have looked through a number of perl books, but I either don't know what I am looking for,

Re: Time and Date

2002-08-19 Thread Elaine -HFB- Ashton
A Taylor [[EMAIL PROTECTED]] quoth: * *Also I have had to add 1 to the hour var: $hour ++; even though my web *space providers are in the same country as me - does anyone know why this *is - I am probably being a bit daft - well it is 1am, and I have been *perling for about 16 hours now !!!

year as variable

2002-08-19 Thread Steve
Hello everyone, I'm just trying to use the simplest of examples to learn how to use different functions and just get an understanding of how things are processed, and the syntax of Perl commands. I just want to get the year as a variable. Here's the rediculously simple script I've started but

Re: year as variable

2002-08-19 Thread Jeff 'japhy' Pinyan
On Aug 19, Steve said: #!/usr/bin/perl You should turn on warnings and use strict. #!/usr/bin/perl -w use strict; If you're using Perl 5.6+, you can remove the -w and replace it with use warnings; print What year were you born in?\n; $a = STDIN; chop($a); chomp(my $birth = STDIN);

Re: year as variable

2002-08-19 Thread dizzy74
use Time::localtime; $b = localtime-year() +1900 ; print What year were you born in?\n; $a = STDIN; chop($a); $age = ($b - $a) ; print You are $age years old!\n; -- Date: August(VIII) 12th(XII),2002(MMII) !!