RE: threads in perl

2003-10-13 Thread Igor Ryaboy
Hi, The program is still exits sometimes without waiting for the threads to finish . I can't understand it. It seem like the "join" just doesn't waits to the process to finish , it just cleans after the thread and decrements the threads->list. Igor -Original Message- From: zentara [mailt

RE: array inside an array

2003-10-13 Thread N, Guruguhan (GEAE, Foreign National, EACOE)
Hi All, Thanks for the quick response and I got what I wanted. Thanks Regards Guruguhan EACoE, India. Ph - *91-80-5031516 Dial Comm - *901-1516 -Original Message- From: Sudarshan Raghavan [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 14, 2003 11:18 AM To: [EMAIL PROTECTED] Subj

Re: array inside an array

2003-10-13 Thread simran
Hello Guru, Your variable in english would be termed as: * An Array whose elements are "Reference to Arrays". As such, you can get to the elements via: $array[0]->[0] will be x1 $array[0]->[1] will be x2 ... $array[2]->[1] will be x8 Have a look at % perldoc perlref for more info... On Tu

Re: array inside an array

2003-10-13 Thread Sudarshan Raghavan
"N, Guruguhan (GEAE, Foreign National, EACOE)" wrote: > Hi All, > I have recently started using Perl for my project. I have a problem in > getting elements of the following array. > > @array1 = ( [ x1, x2, x3], > [ x4, x5, x6], > [ x7, x8, x9]); @array1 is an

array inside an array

2003-10-13 Thread N, Guruguhan (GEAE, Foreign National, EACOE)
Hi All, I have recently started using Perl for my project. I have a problem in getting elements of the following array. @array1 = ( [ x1, x2, x3], [ x4, x5, x6], [ x7, x8, x9]); I would like to get the elements x1 to x9 and replace that with certain numbers.

RE: Is there a better way to?

2003-10-13 Thread Christopher Lyon
I have given that a try and it doesn't work all that great. It seems to be more suited for the To or CC fields and not the from. > -Original Message- > From: simran [mailto:[EMAIL PROTECTED] > Sent: Monday, October 13, 2003 9:12 PM > To: Christopher Lyon > Cc: [EMAIL PROTECTED] > Subject

Help w/Class::Date Date.xs

2003-10-13 Thread perl
Can someone help me with where to put the Date.xs file? I just downloaded the Class-Date-1.1.7.tar.gz. I figured out where to put the 2 files in /usr/lib/perl5/5.8.0/Class: - Class::Date.pm - Class::Date::Const.pm - Date.xs -where shoud it go? I ran th test in the t directory which look like a

Re: Is there a better way to?

2003-10-13 Thread simran
the cpan module: http://search.cpan.org/~miyagawa/Email-Find-0.09/lib/Email/Find.pm might come in handy... On Tue, 2003-10-14 at 13:59, Christopher Lyon wrote: > I have a line of text that I want to pull an e-mail address out from. Is > this the best way to pull that information from that line

Is there a better way to?

2003-10-13 Thread Christopher Lyon
I have a line of text that I want to pull an e-mail address out from. Is this the best way to pull that information from that line? $user = 'From: "First Last Name" <[EMAIL PROTECTED]>'; @addy = split(/ Also, how do you handle if the email is in brackets like so? $user = 'From: "First Last Na

sort w/o using an array

2003-10-13 Thread JOHN FISHER
I am trying to figure out if there is a way to do a sort that doesn't involve putting an entire file in memory. This kind of thing is available in apps like syncsort, where you give it arguments and it uses disk space/virtual memory to do the work. All the examples I am finding are slurping it i

FW: Problem with installing PPM

2003-10-13 Thread Raghupathy, Ramesh .
Ramakrishna, 1) To check packages installed on your machine you have to "query" and not "search". 2) If you want to "search" packages through the proxy server, you need to define the following environment variables: HTTP_PROXY HTTP_PROXY_USER HTTP_PROXY_PASS. On my windows NT machine it is und

RE: malformed header

2003-10-13 Thread Hanson, Rob
The short answer... Make sure this is the first print statement: print "Content-type: text/html\n\n"; The long answer... CGI scripts work by passing the web server a header part and a body part. The header part must contain AT LEAST the content type of the document (e.g. "text/plain", "text/ht

malformed header

2003-10-13 Thread Nino V
Hi, I'm trying my first perl script on a Unix server, but without any success! The script (codice.pl) is something like this: #!/usr/bin/perl $home="/home/dominio/public_html"; print "Home $home"; when I run it, I get this error: malformed header from script. Bad header=Home /home/dominio/publ

RE: working on time

2003-10-13 Thread LoBue, Mark
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Saturday, October 11, 2003 10:19 PM > To: [EMAIL PROTECTED] > Subject: RE: working on time > > > It's fair enough to use 86,400 sec in a day. But what about > adding days or Adding days is simply adding mul

RE: design - help

2003-10-13 Thread Steve Massey
All - especially James/Rob/John and (Shawn for showing how to describe ...) ;) coding ideas work well Big thanks for your time taken to help... Steve -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: design - help

2003-10-13 Thread John W. Krahn
Steve Massey wrote: > > below is sample of my data, OK forget my simplifying, between the data sets > the count can vary, either 23 or 24, number of data sets is knowm - 4, > > ===Data > > 1 (5) ##consider this line number known,, 23 lines to next >

RE: design - help

2003-10-13 Thread Shawn O'Donnell
At 06:53 PM +0100 10/13/03, Steve Massey wrote: a line like2 (5)cannot be expected, what can be expected is that after a count of 23 there will be the next number OR 22 there will be a blank line followed by the next sequence number. So the line will just be Aha! Writing code to parse

Re: design - help

2003-10-13 Thread Rob Dixon
James Edward Gray II wrote: > > Looks like Rob beat me to the draw this time "Go ahead. Make my day!" > but I thought I would add one little tidbit. > > On Monday, October 13, 2003, at 12:15 PM, Rob Dixon wrote: > > > if ( /(\d+)\s+\(\d+\)/ ) { > > I think at least anchoring the pattern to t

Re: design - help

2003-10-13 Thread James Edward Gray II
On Monday, October 13, 2003, at 12:53 PM, Steve Massey wrote: Rob/James Thanks for the input guys, still not quite there, damm nice code though... Well, well, aren't you a problem child. :) Just kidding. the data files I process are typically 3000 lines long and full of blank lines, i use H

RE: design - help

2003-10-13 Thread Steve Massey
Rob/James Thanks for the input guys, still not quite there, damm nice code though... the data files I process are typically 3000 lines long and full of blank lines, i use HTML::PARSER to strip the pages. sod's law say's the example I gave cannot be trusted ( and it can't) a line like2 (5

Re: design - help

2003-10-13 Thread James Edward Gray II
Looks like Rob beat me to the draw this time, but I thought I would add one little tidbit. On Monday, October 13, 2003, at 12:15 PM, Rob Dixon wrote: if ( /(\d+)\s+\(\d+\)/ ) { I think at least anchoring the pattern to the front of the line is a good idea, just so we don't match some arbitra

Re: DBI::XBase not finding table files

2003-10-13 Thread Daniel Staal
--On Monday, October 13, 2003 17:37 +0100 Gary Stainburn <[EMAIL PROTECTED]> wrote: Hi folks, I've got the code below, which is suposed to be showing me the contents of a .dbf file. However, whenever I try to run the program it fails to open the file. Can anyone tell me what I'm missing pleas

Re: design - help

2003-10-13 Thread Rob Dixon
Steve Massey wrote: > > below is sample of my data, OK forget my simplifying, > between the data sets the count can vary, either 23 or > 24, number of data sets is knowm - 4, That's better! Thanks Steve. I think this will do what you need, but doesn't check the number of information blocks. It al

Re: design - help

2003-10-13 Thread Rob Dixon
Steve Massey wrote: > > Thanks for trying to help so far, I think i need to explain a > bit more. The file contains varying data, empty, numeric, text > data is processed in between the ordered numbers say ..1 2 3 4, > the only > thing I can be certain of is, > > 1) line 3 will contain number one(

Re: fflush stdin

2003-10-13 Thread Rob Dixon
Randal L. Schwartz wrote: > > > "Tristram" == Tristram Nefzger <[EMAIL PROTECTED]> writes: > > Tristram> You can do > Tristram> autoflush STDIN 1; > > This does nothing. "flushing" only makes sense on output handles. Thanks Randal. At least someone's awake. /R -- To unsubscribe, e-mail

Re: fflush stdin

2003-10-13 Thread Randal L. Schwartz
> "Tristram" == Tristram Nefzger <[EMAIL PROTECTED]> writes: Tristram> You can do Tristram> autoflush STDIN 1; This does nothing. "flushing" only makes sense on output handles. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <[EMAIL PROTECTED]> http://www.st

DBI::XBase not finding table files

2003-10-13 Thread Gary Stainburn
Hi folks, I've got the code below, which is suposed to be showing me the contents of a .dbf file. However, whenever I try to run the program it fails to open the file. Can anyone tell me what I'm missing please (I've tried appending the .dbf but it made no difference). [EMAIL PROTECTED] dat

RE: design - help

2003-10-13 Thread Steve Massey
James/Rob below is sample of my data, OK forget my simplifying, between the data sets the count can vary, either 23 or 24, number of data sets is knowm - 4, Thanks again for trying to help Steve ===Data 1 (5) ##consider this line number known,,

RE: FW: threads in perl

2003-10-13 Thread Igor Ryaboy
Very Nice , There is only one unsolved issue here: Your program may exit with other threads are still running , beside this I liked it very much. The actual solution you supplied is the use of threads->self function. Thanks you very much!!! Igor BTW where can I get some documentation about threa

Re: design - help

2003-10-13 Thread James Edward Gray II
On Monday, October 13, 2003, at 11:04 AM, Steve Massey wrote: Rob/James Thanks for trying to help so far, I think i need to explain a bit more. Yeah, I appreciate your attempts to simplify it for us, but in the process, I think you changed the problem. ;) The file contains varying data, empty

RE: design - help

2003-10-13 Thread Steve Massey
Rob/James Thanks for trying to help so far, I think i need to explain a bit more. The file contains varying data, empty, numeric, text data is processed in between the ordered numbers say ..1 2 3 4, the only thing I can be certain of is, 1) line 3 will contain number one(start of data set 1) - w

Re: design - help

2003-10-13 Thread Rob Dixon
Steve Massey wrote: > > I hear what your saying, but for this snippet I just want to > cycle through the list, checking the number is correct either > being 3or4 spaces between them, a print out at the end would > be fine. My real data, has ifo on lines in between numbers, but > the count between

Re: design - help

2003-10-13 Thread James Edward Gray II
On Monday, October 13, 2003, at 09:53 AM, Steve Massey wrote: James I hear what your saying, but for this snippet I just want to cycle through the list, checking the number is correct either being 3or4 spaces between them, a print out at the end would be fine. My real data, has ifo on lines

RE: design - help

2003-10-13 Thread Steve Massey
James I hear what your saying, but for this snippet I just want to cycle through the list, checking the number is correct either being 3or4 spaces between them, a print out at the end would be fine. My real data, has ifo on lines in between numbers, but the count between each number will be eith

Re: design - help

2003-10-13 Thread Rob Dixon
Steve Massey wrote: > > my problem is one of progam concept, a data file is as below, > my code (which is not doing what I want it to do is below) > > I want to parse a file with a known 3 blank lines to number 1, > then for each other number it could be either 3 or 4 blank lines. > Each number has

Re: design - help

2003-10-13 Thread James Edward Gray II
On Monday, October 13, 2003, at 09:28 AM, Steve Massey wrote: Hi All Howdy. my problem is one of progam concept, a data file is as below, my code (which is not doing what I want it to do is below) In order to help with your concept, I think I need to understand it a little better. I want to p

design - help

2003-10-13 Thread Steve Massey
Hi All my problem is one of progam concept, a data file is as below, my code (which is not doing what I want it to do is below) I want to parse a file with a known 3 blank lines to number 1, then for each other number it could be either 3 or 4 blank lines. Each number has to be checked to see it'

RE: Problem with installing PPM

2003-10-13 Thread Tristram Nefzger
Hi, I'm not familiar with ActiveState and don't currently use it. On Linux/Unix or in Cygwin under Windows, I use commands of the form perl -MCPAN -e 'install module' Maybe that will work with ActiveState perl too. On Linux/Unix and Cygwin I also use FTP directly to get the modules I want from

Re: Problem with installing PPM

2003-10-13 Thread ramakrishna
Hi, My machine is connetced to Internet through Proxy. when i tried the options, C:\>ping ppm.activestate.com Unknown host ppm.activestate.com. C:\> telnet ppm.activestate.com 80 Connecting To ppm.activestate.com...Could not open a connection to host on port 80 : Connect failed Also i observed o

RE: fflush stdin

2003-10-13 Thread Bob Showalter
Ramprasad A Padmanabhan wrote: > hello all, > Quick question > How do I flush stdin. > I am writing an interactive console based script And I want that all > inputs received before my prompt be flushed > > I looked at Term::Readkey but there seems to be no direct function 1 while defined ReadKey

Re: hex2ascii

2003-10-13 Thread Gary Stainburn
On Monday 13 Oct 2003 12:29 pm, Rob Dixon wrote: > Gary Stainburn wrote: > > I've got tcpdump data in HEX format, which I need to convert > > to characters so that I can then pass it through ebcdic2ascii > > so that I can ready it, i.e. > > > > how can I convert > > > > my $line='48656c6c6f20576f72

RE: fflush stdin

2003-10-13 Thread Tristram Nefzger
You can do autoflush STDIN 1; However, output to the terminal is usually line buffered, see http://www.perldoc.com/perl5.6/pod/perlvar.html There is also an autoflush() function in IO::Handle, see http://www.xav.com/perl/lib/IO/Handle.html -tristram -- To unsubscribe, e-mail: [EMAIL PROTECT

Re: hex2ascii

2003-10-13 Thread Rob Dixon
Gary Stainburn wrote: > > I've got tcpdump data in HEX format, which I need to convert > to characters so that I can then pass it through ebcdic2ascii > so that I can ready it, i.e. > > how can I convert > > my $line='48656c6c6f20576f726c64'; > > so that I get > > print $line,"\n"; > > giving > > H

Re: fflush stdin

2003-10-13 Thread Rob Dixon
Ramprasad A Padmanabhan wrote: > > How do I flush stdin. > I am writing an interactive console based script And I want > that all inputs received before my prompt be flushed > > I looked at Term::Readkey but there seems to be no direct > function use IO::Handle; # At the head of your program

Problems with Storable versions

2003-10-13 Thread Yannick Warnier
Hi all, I have a problem with a multi-OS script with the Storable module. The problem is when freezing an object with one version of Storable.pm and thawing them with another version, my script fails telling me the version of Storable was not the same (he tells me the version which froze and the

hex2ascii

2003-10-13 Thread Gary Stainburn
hi folks, I've got tcpdump data in HEX format, which I need to convert to characters so that I can then pass it through ebcdic2ascii so that I can ready it, i.e. how can I convert my $line='48656c6c6f20576f726c64'; so that I get print $line,"\n"; giving Hello World -- Gary Stainburn T

RE: Problem with installing PPM

2003-10-13 Thread Tristram Nefzger
Are you connected to the Internet, and if so, how - like are you using a web proxy? Try running the following in a DOS window: ping ppm.activestate.com telnet ppm.activestate.com 80 What is the response to each? If they work then your layers 1-3 networking is fine and so is ppm.activestate.

Problem with installing PPM

2003-10-13 Thread ramakrishna
Hi, I am new to perl.I had downloaded Perl from "ActiveState.com" After installing Perl on Win 2000 Adv server, when i enter into PPM mode and use 'Search *' for listing the packages it is showing the following error "ppm> search * Searching in Active Repositories Error: No valid repositorie

fflush stdin

2003-10-13 Thread Ramprasad A Padmanabhan
hello all, Quick question How do I flush stdin. I am writing an interactive console based script And I want that all inputs received before my prompt be flushed I looked at Term::Readkey but there seems to be no direct function Thanks Ram -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additio