Re: OS Name

2002-05-09 Thread Mayank Ahuja
> $^O is *not* the name of the OS on which perl runs, but on which it was > built. If you take e.g. ActivePerl, it's binary download is the same for > all supported versions of Windows. In MKS perl $^O returns Windows_NT on Windows NT (I think MKS perl is not ActivePerl) So, i use the following

Re: Global variables in forked processes

2002-05-09 Thread Ahmed Moustafa
Thanks a lot. I understand that. I was thinking that variable 'x' of a forked process 'p2' would point at the same memory location of variable 'x' of a parent process 'p1'. That can't be true. If that was true, 'p1' and 'p2' would be identitcal (no need to fork!). -- Ahmed Moustafa http://po

win32 specification and API

2002-05-09 Thread drieux
volks, I seem to be unclear from such documentation as I have where exactly does the win32 space begin and end? My premise had been that this was a 'windowing system' on the order of M.I.T's Xwindows, Apple's GUI 'classic' and 'Aqua', and who can forget G.E.M, and and was not 'enmeshed' in

[OT] La razon porque no me oyes con boca abierto.

2002-05-09 Thread Timothy Johnson
"Hablar es el arte de sofocar e interrumpir el pensamiento" This explains A LOT. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Regexp

2002-05-09 Thread drieux
On Thursday, May 9, 2002, at 12:41 , Eduardo Cancino wrote: > Could someone give me some pointers?? > > Thanks! both wag and jonathan have provided most excellent regEx's but their core premise remains that all of the data is always going to be on one line. {wags at least has the 'explosion' li

Re: Multiple pipes going to the same file?

2002-05-09 Thread drieux
On Thursday, May 9, 2002, at 05:02 , Kevin Old wrote: [..] > I have 3 [file handle] pipes of streaming data that need to write to > the same file..can it be done? yes. > If so, how? you might want to review perldoc -f select and go back of how to implement the standard FD_SET

Multiple pipes going to the same file?

2002-05-09 Thread Kevin Old
Hello all, I have 3 [file handle] pipes of streaming data that need to write to the same file..can it be done? If so, how? Thanks, Kevin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: what uid owns process 0?

2002-05-09 Thread LoBue, Mark
on HP-UX: ced1p:[8SICU] CHARTING> ps -p0 PID TTY TIME COMMAND 0 ?23:54 swapper -Mark -Original Message- From: drieux [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 09, 2002 2:26 PM To: [EMAIL PROTECTED] Subject: what uid owns process 0? volks, I decided to hel

Re: Question on password encoding...

2002-05-09 Thread drieux
On Thursday, May 9, 2002, at 12:12 , senrong wrote: > I am require to prompt the customer for a username and password, > and it will be return to my web proxy server in base64-encoded format as > part of the browsers GET request? do you understand that a 'get' will put it in the URL? have you

Re: Pattern Matching...last one.

2002-05-09 Thread Michael Kelly
On 5/9/02 1:15 PM, Batchelor, Scott <[EMAIL PROTECTED]> wrote: > $value =~ s/%([\dA-Fa-f]{2})/pack("C", hex($1))/eg; > > this is saying substitute any alpha, non-alpha characters with the > hexadecimal string of $1. > > I am not sure what the "%" sign does or the "eg" > > Again, thanks in adva

what uid owns process 0?

2002-05-09 Thread drieux
volks, I decided to help john to start by writing a ps Tree to process the data into the classic tree structures we all like: http://www.wetware.com/drieux/CS/lang/Perl/Beginners/Sys/psTree.txt and I keep getting the output pid: 0 is owned by UNK and has children: 1 2 but if I do:

RE: apache::session

2002-05-09 Thread Hanson, Robert
The short version... 1. get the cookie from the user (using CGI.pm or other mod). 2. tie hash to Apache::Session passing a database handle and the cookie val. 3. set or refresh the cookie with the session ID (from Apache::Session). 4. store and fetch to the tied hash. Rob -Original Message-

apache::session

2002-05-09 Thread Matthew Harrison
I have had a look at the apache::session description on CPAN but I do not understand how it is applied to a site over a number of different CGI scripts (eg, login, forums, membership area). Please could someone give me some simple directions? thanks guys -- Matthew Harrison Internet/Network

Pattern Matching...last one.

2002-05-09 Thread Batchelor, Scott
$value =~ s/%([\dA-Fa-f]{2})/pack("C", hex($1))/eg; this is saying substitute any alpha, non-alpha characters with the hexadecimal string of $1. I am not sure what the "%" sign does or the "eg" Again, thanks in advance. Scott -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

RE: Regexp

2002-05-09 Thread Wagner-David
Here is one shot. Wags = Script starts after this line. #!perl -w y @MyInfo = (); while ( ) { chomp; next if ( /^\s*$/ ); # Bypass any blanklines if ( ! /^\"([^"]+)\"\.\s+([^]+

Re: Regexp

2002-05-09 Thread Jonathan E. Paton
> I have a lot of trouble understanding regexes, i just don't get how to parse > a file with: > > "Hablar es el arte de sofocar e interrumpir el pensamiento". Thomas Carlyle > (1795-1881); historiador y ensayista escocés. > "Se aprende más por lo que la gente habla entre sí o por lo que se > sobr

Regexp

2002-05-09 Thread Eduardo Cancino
Hello! I have a lot of trouble understanding regexes, i just don't get how to parse a file with: "Hablar es el arte de sofocar e interrumpir el pensamiento". Thomas Carlyle (1795-1881); historiador y ensayista escocés. "Se aprende más por lo que la gente habla entre sí o por lo que se sobrentien

Re: Pattern Matching...

2002-05-09 Thread John W. Krahn
Scott Batchelor wrote: > > Ok thanks wags...that explains it. > > Now don't flame me hehe but... > > $value =~ s/\+/ /g; is saying substitute any "+" with a space...right? Yes but more experienced Perl programmers would write that as: $value =~ tr/+/ /; John -- use Perl; program fulfillme

Re: Pattern Matching...

2002-05-09 Thread John W. Krahn
Scott Batchelor wrote: > > Ok, Sorry guys I am trying to get my head around this... > > $pair=~m/([^=]+)=(.*)/) > > The "m" means treat string as multiple lines No, m/regex/ and /regex/ mean the same thing. The "m" is usually used if you use different delimiters for the regex, for example:

RE: Pattern Matching...

2002-05-09 Thread Wagner-David
Yes, but will replace all within the string(ie, if $value = "ab = ab = ab = ab" then you will get "ab ab ab ab"). Wags ;) -Original Message- From: Batchelor, Scott [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 09, 2002 12:11 To: [EMAIL PROTECTED] Subject: RE: Pattern Match

Question on password encoding...

2002-05-09 Thread senrong
I am require to prompt the customer for a username and password, and it will be return to my web proxy server in base64-encoded format as part of the browsers GET request? So how actually do I do it? Another question, presently I am working on a XP platform and that I wish to do preforking. I

Re: Pattern Matching...

2002-05-09 Thread Michael Fowler
On Thu, May 09, 2002 at 01:54:56PM -0500, Batchelor, Scott wrote: > $pair=~m/([^=]+)=(.*)/) > > The "m" means treat string as multiple lines The "m" means "match". "m" only means treat the string as multiple lines if it's on the end, i.e. /.../m. The leading "m" here is basically useless, but

RE: Pattern Matching...

2002-05-09 Thread Batchelor, Scott
Ok thanks wags...that explains it. Now don't flame me hehe but... $value =~ s/\+/ /g; is saying substitute any "+" with a space...right? Again thanks everyone for your help in advance. Scott -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thurs

Re: Pattern Matching...

2002-05-09 Thread Chris Ball
> "Scott" == Scott Batchelor writes: Scott> $pair=~m/([^=]+)=(.*)/) Scott> This basically says start at the beginning of the string and Scott> match any "=" all the way to the end of the string...right? No, I'm afraid not. You can get an English explanation of a regexp with Ja

RE: Pattern Matching...

2002-05-09 Thread Wagner-David
([^=]+) goes into $1 (.*)goes into $2 Unless the parens are escaped(ie, \( ), you count from the left where the first ( is $1, 2nd is $2 ,etc. They can be nested if necessary. Wags ;) -Original Message- From: Batchelor, Scott [mailto:[EMAIL PROTECTED]] Sent: Thursday

RE: Pattern Matching...

2002-05-09 Thread Batchelor, Scott
Ok, Sorry guys I am trying to get my head around this... $pair=~m/([^=]+)=(.*)/) The "m" means treat string as multiple lines Then we are grouping with a parenthesis and the "^=" is saying matching anything up to the "=" The "+" is a quantifier saying that must match 1 or more times... Th

Re: converting String to Hexadecimal

2002-05-09 Thread Michael Fowler
On Thu, May 09, 2002 at 02:22:36PM +0200, Ankit Gupta wrote: > I am trying to convert a string to Hexadecial format. For example I am > trying to convert <[EMAIL PROTECTED]> to hexadecimal > format and it gives me result as 0 . Similary if I try to convert such type > of different strings, it stil

Re: here document

2002-05-09 Thread Chas Owens
On Thu, 2002-05-09 at 13:45, Elliott M Moskowitz wrote: > How do you implement a Unix shell "here" document in perl ? Do you mean a here string like this: my $string = <<'ENDOFSTRING'; this is a string. ENDOFSTRING or to you mean real here files like this: ../script.pl <) magic). -- Today is

Re: here document

2002-05-09 Thread Michael Kelly
On 5/9/02 10:45 AM, Elliott M Moskowitz <[EMAIL PROTECTED]> wrote: > How do you implement a Unix shell "here" document in perl ? $stuff = <

Re: File System Path Format

2002-05-09 Thread Michael Fowler
On Thu, May 09, 2002 at 11:22:07AM -0400, Shishir K. Singh wrote: > a)Is there any function that returns the file path format depending on the > OS name? Not that I know of. There is, however, a couple of modules for dealing with paths. First, there's File::Basename for splitting off the dire

Re: Win32::ODBC problem...

2002-05-09 Thread Paul Johnson
On Wed, May 08, 2002 at 09:07:09AM -0400, Lovelace, Dafina wrote: > Greetings All! > > I am using the Benchmark module in my code, trying to time a specific sub > function. Does anyone know how to get milli/micro seconds (or anything > smaller than a second) to show up when I print to the log fil

here document

2002-05-09 Thread Elliott M Moskowitz
How do you implement a Unix shell "here" document in perl ? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Help with syntax

2002-05-09 Thread John W. Krahn
Chris Rogers wrote: > > I am getting a syntax error that I can't seem to resolve. > > The single dimensioned array to be sorted consists of rows that look like > this: > > 105|1156|1|576|VIFAN|1|576|10/24/97|0426|0048|0050|0|0|0|0|01/01/00|12/21/99 > |LCI > > Each record is pipe "|" delimited

RE: cp -r problem

2002-05-09 Thread Nikola Janceski
Attached is a script that I created for doing such a thing, but instead of copying it links files. So you can finagle the program to your needs. It's specific for my needs so some of the stuff in there is not needed for you. NOTE: this requires perl v5.6.1 or higher to work. PS. you will probabl

Re: Pattern Matching...

2002-05-09 Thread Felix Geerinckx
on Thu, 09 May 2002 17:33:21 GMT, Scott Batchelor wrote: > $pair=~m/([^=]+)=(.*)/) > > This basically says start at the beginning of the string and match > any "=" all the way to the end of the string...right? Wrong. This says: Match anything (of at least one character) up to but not including

Pattern Matching...

2002-05-09 Thread Batchelor, Scott
I just want to be sure I understand what this statement says: $pair=~m/([^=]+)=(.*)/) This basically says start at the beginning of the string and match any "=" all the way to the end of the string...right? Thanks! Scott -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional com

cp -r problem

2002-05-09 Thread Ettiene Voges
hi all. i want to do a cp -r in perl without doing it from the unix / backtick It seems that it can be implemented with file::find and file::copy modules, but it is a quite a whole program on its own , for a beginner, as i am Am I trying to do it on the most difficult way imaginable, or do I miss