Concatenating

2002-04-26 Thread james poni
Hello I have 3 text files and i want to perform concatenation from each line of the 3 files. I want the output to look like this: aaa mon 1 bbb wed 2 ccc sun 3 ddd tue 4 Is it possible to sort the days column in order of the week? Eg ccc sun 3 aaa mon 1 ddd tue 4 bbb wed 2 This is my code b

more mod_perl

2002-04-26 Thread Beau
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Good news: reinstalling perl from CPAN source went off without a hitch. So, back to the take23.org instructions for setting up mod_perl with an existing apache, I'm still getting: Unable to determine server version, aborting. Please specify MP_AP

Fixing the Quality of our OldBies was Re: GoryDetails on: error log message

2002-04-26 Thread drieux
On Friday, April 26, 2002, at 02:17 , Timothy Johnson wrote: > no porroblem.k jshlust let ush know. Ok HappyKampfr's That's It - we clearly need to have a serious heart to heart chat about upgrading the quality of the 'not newbies'. Kids these days Wasn't Like that when i was growing

Removing ^M (Carriage Return) from files on *nix

2002-04-26 Thread Shaun Fryer
Someone mentioned this problem recently. Here's a solution. Open the file in vi and type... :g/[Ctrl+v][Ctrl+m]/s/// That will remove all the Carriage Returns from the file in one shot. === Shaun Fryer === London Webmasters http://LWEB.NET PH:

Re: assigning array to hash

2002-04-26 Thread Shaun Fryer
> Below is part of some code that reads from a file to an array and then > attempts to assign the array to a hash. I get no compiling errors, but > %label_hash is empty. No doubt I am being stupid. Has anyone a > suggestion how to fill the hash variable? Well, I'm not totally certain wha

Re: Backing up two days from localtime

2002-04-26 Thread John W. Krahn
Tara Calishain wrote: > > Actually, are there any books/docs that talk specifically about dealing > with time? http://www.rdbooks.com/store/products/rd2735.htm John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTE

RE: assigning array to hash

2002-04-26 Thread Shah, Urmil
If you want to assign an array to a fixed key that is if you want something like: one key -> multiple values(eg array) you can use my $label_hash{$key1} = [@array1]; $label_hash{$key2} = [@array2]; ... ... Urmil -Original Message- From: Felix Geerinckx [mailto:[EMAI

RE: GoryDetails on: error log message

2002-04-26 Thread Timothy Johnson
no porroblem.k jshlust let ush know. -Original Message- From: Mat Harrison [mailto:[EMAIL PROTECTED]] Sent: Friday, April 26, 2002 2:03 PM To: [EMAIL PROTECTED] Subject: RE: GoryDetails on: error log message i will reply to this post as soon as i can but i have just come home from a b

RE: GoryDetails on: error log message

2002-04-26 Thread Mat Harrison
i will reply to this post as soon as i can but i have just come home from a beer festival and am a bit worse for wear. -Original Message- From: drieux [mailto:[EMAIL PROTECTED]] Sent: Friday, April 26, 2002 5:40 PM To: [EMAIL PROTECTED] Subject: Re: GoryDetails on: error log message On

RE: Debugging and 'uninitialized value in concatenation' question

2002-04-26 Thread Chas Owens
On Fri, 2002-04-26 at 14:51, Jason Frisvold wrote: > Hrm.. I'll run some tests with it and see what I find out... Sounds > promising if it really is a preprocessor... So does it just do > something along the lines of a cat | grep -v and then > execute the output? (I realize that is simplifyi

module installation error

2002-04-26 Thread Shah, Urmil
I am trying to install perl Chart::Plot module in my home directory since i dont have the right to install in the server. This module is dependent on GD module so i am trying to install GD-1.38 first. but it gives me following error >perl Makefile.PL PREFIX=/usr/home/myname/usr/local NOTICE: This

RE: Debugging and 'uninitialized value in concatenation' question

2002-04-26 Thread Jason Frisvold
Hrm.. I'll run some tests with it and see what I find out... Sounds promising if it really is a preprocessor... So does it just do something along the lines of a cat | grep -v and then execute the output? (I realize that is simplifying it by a great deal) I'm just trying to wrap my head aro

Re: assigning array to hash

2002-04-26 Thread drieux
On Friday, April 26, 2002, at 10:28 , richard noel fell wrote: > Drieux - > Thanks. I altered the LABEL_FILE data format as you suggested and all > works just fine now. > Dick you could of course generate the file in the form key val key1 val1 and then do the simpler shot to the hash

Re: CPAN?

2002-04-26 Thread Elaine -HFB- Ashton
Bryan R Harris [[EMAIL PROTECTED]] quoth: *> *>This is the beginners list, right? *> *>I heard that you could find code for almost anything at CPAN. How do you *>go about this? The front page of CPAN lists a number of search engines for CPAN and a FAQ. *>For example, say I want to recurse throu

Re: assigning array to hash

2002-04-26 Thread richard noel fell
Drieux - Thanks. I altered the LABEL_FILE data format as you suggested and all works just fine now. Dick Drieux wrote: > > On Friday, April 26, 2002, at 06:55 , Jeff 'japhy' Pinyan wrote: > > > The hash is not empty -- printing "%foo" does nothing special. To dump a > > hash, do someth

Re: assigning array to hash

2002-04-26 Thread richard noel fell
Drieu : Whoops. I forgot the chomp. The data in the LABEL_FILE is formatted as: "key"=>"val", "key1"=>"val1", which seems to work since the for loop prints as expected. Dick Drieux wrote: > > On Friday, April 26, 2002, at 06:55 , Jeff 'japhy' Pinyan wrote: > > > The hash is not empty -- prin

Re: Debugging and 'uninitialized value in concatenation' question

2002-04-26 Thread Tanton Gibbs
If all you are doing is debugging the entrance to and exit of functions you can look at aspect oriented programming. Search CPAN for Aspect. It may allow you to do other things, but I know it will do that. Basically, you can write functions that are called when other functions are called withou

Re: GoryDetails on: error log message

2002-04-26 Thread drieux
On Friday, April 26, 2002, at 09:07 , Mat Harrison wrote: > i have tried from the command line, on both server it returns: > > Location: http://whatever.the.url.was which is what we would expect to get > however only one works via web browser 'one' is an ill defined pronoun when I pu

Re: Net::SNMP module example failing

2002-04-26 Thread Ted Hajduk
Tim, Just an FYI. Upgraded the Net::SNMP module to 4.0.1 from 3.6 and everything works. Regards Ted --- Tim Musson <[EMAIL PROTECTED]> wrote: > Hey Ted, > > My MUA believes you used (X-Mailer not set) > to write the following on Wednesday, April 24, 2002 > at 9:56:09 PM. > TH> Hello, > >

RE: associative array not looking like I thought it would

2002-04-26 Thread David Gray
> This was all written by a vendor and I am trying to learn > PERL to modify what they did. When you say I must print it > explicitly, what exactly do you mean? You have to _sort_ it explicitly. In Timothy's example, he was sorting the hash alphabetically based on the keys. The keys function r

RE: GoryDetails on: error log message

2002-04-26 Thread Mat Harrison
i have tried from the command line, on both server it returns: Location: http://whatever.the.url.was however only one works via web browser -Original Message- From: drieux [mailto:[EMAIL PROTECTED]] Sent: Friday, April 26, 2002 4:55 PM To: Mat Harrison Subject: Re: GoryDetails on: erro

RE: Debugging and 'uninitialized value in concatenation' question

2002-04-26 Thread Chas Owens
On Fri, 2002-04-26 at 11:44, Jason Frisvold wrote: > While this appears to be a decent solution, I think I would still > encounter the same problem that I wanted to avoid... Every time it > encounters a CPP statement (#IF DEBUG, #DEFINE, etc) then it still needs > to make the proper calls and wha

RE: Debugging and 'uninitialized value in concatenation' question

2002-04-26 Thread Jason Frisvold
While this appears to be a decent solution, I think I would still encounter the same problem that I wanted to avoid... Every time it encounters a CPP statement (#IF DEBUG, #DEFINE, etc) then it still needs to make the proper calls and whatnot... Whereas in C, since it's compiled, the pre-process

RE: Backing up two days from localtime

2002-04-26 Thread Timothy Johnson
You can convert the date/time to seconds format using the Time::Local module. It attempts to do a "reverse localtime()". -Original Message- From: Felix Geerinckx To: [EMAIL PROTECTED] Sent: 4/26/02 5:40 AM Subject: Re: Backing up two days from localtime on Fri, 26 Apr 2002 12:32:21 GM

RE: OT - Funny Comic

2002-04-26 Thread Timothy Johnson
Join us next week for "Obfuscate that code!". -Original Message- From: Kevin Old To: [EMAIL PROTECTED] Sent: 4/26/02 8:13 AM Subject: OT - Funny Comic Hello all, I ran across this funny comic related to Perl. Thought I'd share. http://www.unitedmedia.com/comics/workingdaze/archive/w

OT - Funny Comic

2002-04-26 Thread Kevin Old
Hello all, I ran across this funny comic related to Perl. Thought I'd share. http://www.unitedmedia.com/comics/workingdaze/archive/workingdaze-20020328.html Kevin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: mod_perl

2002-04-26 Thread Beau
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Friday 26 April 2002 01:21 am, Jonathan E. Paton wrote: > Okay, here is the problem: > > version 5.6.0 = version 5.006 Jonathan, Thanks for this. More than a little arcane, exactly the kind of thing I can imagine taking years to discover on my o

Support Perl Orthodoxy : Re: GoryDetails on: error log message

2002-04-26 Thread drieux
On Friday, April 26, 2002, at 07:55 , Mat Harrison wrote: > you are a saint. [..] do I look like roger moore? { or do kids only know the val kilmer variant? } the critical part to remember happyKampfr's is that had he followed the canonical orthodoxy of #!/usr/bin/perl -w us

RE: GoryDetails on: error log message

2002-04-26 Thread Mat Harrison
you are a saint. thank you so much, that has solved countless problems from so many different applications. I am gland I have finally used dos2unix. Thanks again -Original Message- From: drieux [mailto:[EMAIL PROTECTED]] Sent: Friday, April 26, 2002 3:42 PM To: Mat Harrison Subject: Fwd:

Re: Debugging and 'uninitialized value in concatenation' question

2002-04-26 Thread Chas Owens
On Thu, 2002-04-25 at 14:49, Jason Frisvold wrote: > Judging from the subject lines coming across the list today, I think I'm > gonna toss this question out there and then duck and cover... :-) > > I have 2 actual questions. I'll try to be as specific as possible.. > :-) > > Question #1. > >

error log message

2002-04-26 Thread Mat Harrison
what does this mean in my apache error log? i get it A LOT. someone said that it was something to do with windows/linux line ending compatibility probs. [Thu Apr 25 23:48:59 2002] [error] (2)No such file or directory: exec of /web/cgi-bin/genestate/check_login.cgi failed [Thu Apr 25 23:48:59 20

Re: DBD-ODBC - WIN2K - ACCESS

2002-04-26 Thread Frank Wiles
> while ( (my $id, my $name, my $par, my $time) = $sth->fetchrow) { > print start_html(-title=>"Noticia: > $name",-style=>({-src=>"/_include/portal.css"})); > print h3("$name"), > p("$par"), > #p("$par1"), > p("$time"), > p(a({-h

Re: assigning array to hash

2002-04-26 Thread drieux
On Friday, April 26, 2002, at 06:55 , Jeff 'japhy' Pinyan wrote: > The hash is not empty -- printing "%foo" does nothing special. To dump a > hash, do something like: > > for (keys %hash) { > print "$_ => $hash{$_}\n"; > } we of course presume that Richard already remembers two small n

DBD-ODBC - WIN2K - ACCESS

2002-04-26 Thread Eduardo Cancino
HI. I'm having this problem I have a memo field that i use for the main text and when i access it my script just prints a blank page, but when the field is reduced my scripts prints exactly as i want to: You know why?? SOME CODE #!c:/perl/bin/perl.exe # cargar modulos use DBI; use CGI qw(:stan

Re: assigning array to hash

2002-04-26 Thread Felix Geerinckx
on Fri, 26 Apr 2002 14:09:24 GMT, [EMAIL PROTECTED] (Richard Noel Fell) wrote: > Below is part of some code that reads from a file to an array and > then attempts to assign the array to a hash. I get no compiling > errors, but %label_hash is empty. No doubt I am being stupid. Has > anyone a sug

Re: assigning array to hash

2002-04-26 Thread richard noel fell
Jeff - Thanks for your reply. Now, on to solve the remaining problems. Dick Fell Jeff 'Japhy' Pinyan wrote: > > On Apr 26, richard noel fell said: > > >Below is part of some code that reads from a file to an array and then > >attempts to assign the array to a hash. I get no com

Re: Backing up two days from localtime

2002-04-26 Thread Michael Lamertz
On Fri, Apr 26, 2002 at 08:32:21AM -0400, Tara Calishain wrote: > I'm anticipating coming across this same problem with user input dates, and > I don't expect the seconds trick will work for that one. > > For example, say a user specified $day-$month-$year and ten days, and I > wanted to generat

Re: assigning array to hash

2002-04-26 Thread Jeff 'japhy' Pinyan
On Apr 26, richard noel fell said: >Below is part of some code that reads from a file to an array and then >attempts to assign the array to a hash. I get no compiling errors, but >%label_hash is empty. No doubt I am being stupid. Has anyone a >suggestion how to fill the hash variable? The hash

assigning array to hash

2002-04-26 Thread richard noel fell
Below is part of some code that reads from a file to an array and then attempts to assign the array to a hash. I get no compiling errors, but %label_hash is empty. No doubt I am being stupid. Has anyone a suggestion how to fill the hash variable? Thanks, Dick Fell open LABEL_FILE, "$cur

RE: error log message

2002-04-26 Thread Mat Harrison
sorry, if anyone has replied to this post could they please forward them to me again if it isn't too much trouble as my email server shut down overnight for some reason. -Original Message- From: Mat Harrison [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 25, 2002 11:56 PM To: BeginnersP

UTF-8 support on Windows and Linux

2002-04-26 Thread Gregor Chrupala
Hi All, I am using perl5.6.1 both on Windows 2000 and Mandrake Linux 8.1. On Windows the UTF-8 strings are handled in a reasonable manner, that is length() returns the number of characters and /./ matches a single character. On Linux though, length seems to return the byte length of the string, a

Re: Backing up two days from localtime

2002-04-26 Thread Felix Geerinckx
on Fri, 26 Apr 2002 12:32:21 GMT, [EMAIL PROTECTED] (Tara Calishain) wrote: > Actually, are there any books/docs that talk specifically about > dealing with time? > I'm anticipating coming across this same problem with user input > dates, and I don't expect the seconds trick will work for that >

Re: associative array not looking like I thought it would

2002-04-26 Thread P. S. Starkey
Thanks for the info! Here is a code snippet we are using to process the array: sub ViewError( % ) { if( $MAIN::FUNCTION != $MAIN::F_NOTHING ) { if ( $MAIN::SOURCE == $MAIN::S_ERROR || $MAIN::SOURCE == $MAIN::S_BOTH) { $Err207Flag = "N"; ## P. Starkey 10/12/2000

Re: Backing up two days from localtime

2002-04-26 Thread Tara Calishain
At 02:05 AM 4/26/2002, Jeff 'japhy' Pinyan wrote: > >I need to back up two days from localtime and I can't figure out how to do > >it. Currently I'm doing this just so I can work out the rest of the program: > > > >($day, $month, $year) = (localtime) [3,4,5]; #getting your local time > >The generi

Thanks alot Boris

2002-04-26 Thread Bruce Ambraal
Hi Boris I see you are still around. Well I just want to take the oportunity in thanking you for all the help that you have given me I really appreciate it. Go well. Psst! Boris is the man of the hour with more power. Cheers Bruce -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additiona

Re: Backing up two days from localtime

2002-04-26 Thread Michael Lamertz
On Fri, Apr 26, 2002 at 09:32:04AM +0100, Jonathan E. Paton wrote: > > I need to back up two days from localtime and I can't > > figure out how to do it. Currently I'm doing this just > > so I can work out the rest of the program: > > [Ignore me if you aren't on a Unix like platform] > > Hi, >

Re: Debugging and 'uninitialized value in concatenation' question

2002-04-26 Thread Michael Lamertz
On Thu, Apr 25, 2002 at 02:49:16PM -0400, Jason Frisvold wrote: > Judging from the subject lines coming across the list today, I think I'm > gonna toss this question out there and then duck and cover... :-) Hmm, I can't see any obvious reason to flame that post. It's a technique and style quest

Re: setruid?

2002-04-26 Thread Michael Lamertz
Aye, that's been a nice demonstration of how to approach a dubious problem with too few information. Really! So don't consider this message as an answer to your post, but more like an addendum: On Thu, Apr 25, 2002 at 08:03:30PM +0100, Jonathan E. Paton wrote: > > Hang on... did I miss someth

Me and Modules

2002-04-26 Thread Jackson, Harry
Hi all I noticed a couple of questions earlier about modules. I have only been at Perl a short while and when I first encountered them I was able to relate to them as libraries in C/C++. However, this analogy does not go any distance to help the Perl Novice who is stumbling blindly along the ho

Re: OpenInteract and others

2002-04-26 Thread Boris Zentner
Hi, > > I hope this is the appropriate forum for this question. > > I have been looking for a pretty good base system for which to build > a portal system. (messages, news, other content, weather) > Look at PageKit http://www.pagekit.org -- cu boris Letzte Worte eines Handgranatenwerfers

Re:regexp needed

2002-04-26 Thread Felix Geerinckx
on Fri, 26 Apr 2002 09:05:29 GMT, [EMAIL PROTECTED] (Jorge Goncalvez) wrote: > And I wanted to match what is between from and filename ie > 192.40.54.42 and what comes after filemane ie With a dataline in $_: print "$1 $2\n" if /.*from ([\d\.]+) filename ([^ ]+)/; -- felix -- To un

Re:regexp needed

2002-04-26 Thread Jorge Goncalvez
HI, I have a file like this: . 1015322638: in.tftpd : Win32 Process Id = 0xBF : Cygwin Process Id = 0xBF : RRQ from 192.40.54.42 filename /bootp/linux/4.0/alize/initrd.img (in.tftpd) .. And I wanted to match what is between from and filename ie 192.40.54.42 and what comes after filema

Re: Backing up two days from localtime

2002-04-26 Thread Jonathan E. Paton
> I need to back up two days from localtime and I can't > figure out how to do it. Currently I'm doing this just > so I can work out the rest of the program: [Ignore me if you aren't on a Unix like platform] Hi, You should seriously consider installing the 'at' job manager for run-once tasks, o

Re: mod_perl

2002-04-26 Thread Jonathan E. Paton
> You are running Perl version 5.006 > We strongly suggest to upgrade to at least 5.6.1 > Reading Makefile.PL args from @ARGV > Unable to determine server version, aborting > Please specify MP_APXS or MP_AP_PREFIX > > To make matters worse, rpm -q perl tells me I'm running perl-5.6.0-12, > quite

Re: http headers

2002-04-26 Thread Felix Geerinckx
on Fri, 26 Apr 2002 04:00:06 GMT, [EMAIL PROTECTED] (Conan chai) wrote: > more details on what i'm doing: > i'm doing a simple proxy server. Randal Schwartz has done a proxy server in one of his Webtechniques columns. Maybe you can get some ideas from it. See