References

2002-04-21 Thread Hans Holtan
Hi folks, The code shown bellow is supposed to de-reference a hash-reference of array-references and print everything out nicely. But the array references do not get de-referenced. I really appreciate the help. Thanks, Hans #!usr/bin/perl -w use strict; use warnings; use diagnostics; my $ali

Re: $1 $2 $3 variables

2002-04-21 Thread drieux
On Sunday, April 21, 2002, at 11:41 , Jeff 'japhy' Pinyan wrote: > On Apr 22, pat said: [..] >> $line = "Mar 17 08:48:50 msasa pppd[6404]: Connect: ppp0 <--> /dev/ttyS1" > > Well, there's no need to put them into $1, $2, etc. That can only be done > with a regex, and there's no need to do > >

Re: How to thread in Perl?

2002-04-21 Thread drieux
On Sunday, April 21, 2002, at 08:09 , Chas Owens wrote: [..] > The daemon should not come down until all of its children are finished. > That is why you need intercept SIGTERM. [..] technically the correct structure for RFC compiance is The daemon MUST NOT come down until all of its chi

RE: Time being displayed is off my 7 hours

2002-04-21 Thread Wagner-David
Thanks, Drieux. Somewhere along the line and for reasons I realy don't remember, I added a variable TZ set to PST. Up til the switchover, I know the time outputted for my scripts was correct. I removed from the environment. Re-booted machine and I am back in sync with the correct time.

RE: Time being displayed is off my 7 hours

2002-04-21 Thread Wagner-David
Both have the same setup and both from a ksh give the same data output. I tried it from the command prompt and it gave me the same time offset of 7 hours while from the nt 4.0 it gave me the right time. I know that it has something to do with the time switch, but otherwise I am

Re: Passing a variable to a DOS batch file

2002-04-21 Thread Elias Assmann
On Sun, 21 Apr 2002, Michael Lamertz wrote: > On Sun, Apr 21, 2002 at 01:45:27PM +0200, Elias Assmann wrote: > > > If the Perl script is the last thing the batch file executes, I don't > > really see a problem, since you could just let the Perl script emit > > the error/success message. That migh

RE: browsing html pages

2002-04-21 Thread Ron Goral
I have recently taken a stab at this myself. There is probably an easier way, but I could not make ::TreeBuilder respond well. I had to sub-class it. I'm sure that drieux has some wisdom about this and how to do it more easily. =) Peace In Christ - Ron Goral [EMAIL PROTECTED]

RE: Time being displayed is off my 7 hours

2002-04-21 Thread Timothy Johnson
That IS strange. I've been using localtime on NT Servers and Workstations for a while now without seeing this disparity. Do both machines have the MKS Toolkit installed? Are you running the script from the command prompt or ksh? If it's ksh, do you see the same thing if you run it from the c

Re: browsing html pages

2002-04-21 Thread Elaine -HFB- Ashton
Martin [[EMAIL PROTECTED]] quoth: *> *>As a Perl rookie I've got a serious problem trying to find out how to write *>a code which should do the following stuff: connect to specified URL using *>HTTP, send GET / PUT messages and process the output (web page) from the *>server. I went throug my Perl

Re: $1 $2 $3 variables

2002-04-21 Thread Jeff 'japhy' Pinyan
On Apr 22, pat said: >I've just started with perl and have 2 questions:- >Ques 1) If someone would kindly show me the code to split the following into >the special variables $1 $2 $3 upto $9. I have spent the best part of today >on it and I can separate the 08:45:50 and separate the string if the

$1 $2 $3 variables

2002-04-21 Thread pat
I've just started with perl and have 2 questions:- Ques 1) If someone would kindly show me the code to split the following into the special variables $1 $2 $3 upto $9. I have spent the best part of today on it and I can separate the 08:45:50 and separate the string if there were ','s in it - which

Re: pack / unpack

2002-04-21 Thread drieux
On Sunday, April 21, 2002, at 07:49 , Jon Howe wrote: > I should have been more specific or my be I have missed the point again : > ( > the file is UTF-8 encoded which is fine > for what I want. > > However, I need to get at bullet points within the text. these apear as > the > entity â~@¢ in v

Re: Time being displayed is off my 7 hours

2002-04-21 Thread drieux
On Sunday, April 21, 2002, at 08:01 , [EMAIL PROTECTED] wrote: > Just doing a call to : > > sub get_time { > ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = > localtime(time - $diff); > $mon++; > } # end of get_time This Always worries me - make the drieux FEEL saver -

Re: Passing a variable to a DOS batch file

2002-04-21 Thread Michael Lamertz
On Sun, Apr 21, 2002 at 01:45:27PM +0200, Elias Assmann wrote: > If the Perl script is the last thing the batch file executes, I don't > really see a problem, since you could just let the Perl script emit > the error/success message. That might leave you with the problem of > exiting the batch sc

Re: pack / unpack

2002-04-21 Thread Jonathan E. Paton
> re:Have you got the hex code for that one? I presume this is the only > > character causing difficulty - hence we really want to avoid turning > > the whole string into hex numbers - which are harder to process. > > $values = unpack('H*',"$file"); > > output for the entity â~@¢ > > HEX: e28

Re: How to thread in Perl?

2002-04-21 Thread Chas Owens
On Fri, 2002-04-19 at 21:38, Ahmed Moustafa wrote: > Chas Owens wrote: > > my $terminate = 0; > > $SIG{TERM} = sub { $terminate = 1 }; > > until ($terminate) { > > #do stuff > > } > > > > #cleanup > > > > > > You should definitely provide some means of cleanly bring down your > > daemon. >

Re: pack / unpack

2002-04-21 Thread Jon Howe
re:Have you got the hex code for that one? I presume this is the only > character causing difficulty - hence we really want to avoid turning > the whole string into hex numbers - which are harder to process. $values = unpack('H*',"$file"); output for the entity â~@¢ HEX: e280a20a Jon

RE: Time being displayed is off my 7 hours

2002-04-21 Thread Wagner-David
Just doing a call to : sub get_time { ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time - $diff); $mon++; } # end of get_time where $diff equals zero. If I type date at my ksh ( MKS Korn Shell) I get: Sun Apr 21 07:58:25 PDT 2002

Re: pack / unpack

2002-04-21 Thread Jonathan E. Paton
> I should have been more specific or maybe I have missed the point again :( > the file is UTF-8 encoded which is fine for what I want. > > However, I need to get at bullet points within the text. these apear as the > entity â~@¢ in vi. Have you got the hex code for that one? I presume this is t

Re: what is this syntax mean?

2002-04-21 Thread Jenda Krynicky
From: bob ackerman <[EMAIL PROTECTED]> > could someone explain how this syntax works? > does the call to member function 'proxy' return the object which is > then used to call function 'uri' which returns the object which is > used to call function 'hi' which returns the object which is used to >

RE: Time being displayed is off my 7 hours

2002-04-21 Thread Wagner-David
Everything looks fine from a 'windows perspective' and this is not a new load though it was not setup for last year when the daylight savings switched over. I assume it has something to do with that, but now shows a 7 hour lapse. I believe that that is the difference in GM time to Pac

Re: SOAP::Lite documentation?

2002-04-21 Thread Todd Wade
"Tara Calishain" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Is there SOAP::Lite documentation for Perl novices? Everything I've found > so far seems > to be written for more advanced users. perl.com did a two parter. The articles there always give a good

Re: pack / unpack

2002-04-21 Thread Jon Howe
I should have been more specific or my be I have missed the point again :( the file is UTF-8 encoded which is fine for what I want. However, I need to get at bullet points within the text. these apear as the entity â~@¢ in vi. So I thought if could the hex value It would able to deal with any re

Re: pack / unpack

2002-04-21 Thread Jonathan E. Paton
> I am trying to convert a file into hex from text > with a view to doing some manipulation before > turning it back to text. One has to ask: WHY??? (Unless using tools that already exist) Perl can handle both text and binary information, and you can do all your binary manipulations as if you we

pack / unpack

2002-04-21 Thread Jon Howe
I am trying to convert a file into hex from text with a view to doing some manipulation before turning it back to text. #! /usr/bin/perl -w undef $/; open(IN, "< file") || die "no on file"; $file = ; print unpack('H*',"$file"); print "\n\nCONV TO TXT HERE\n\n"; print pack('H*',"$file");

Re: Passing a variable to a DOS batch file

2002-04-21 Thread Elias Assmann
On Sun, 21 Apr 2002, Michael Lamertz wrote: > On Sat, Apr 20, 2002 at 08:07:09PM -0400, Paul Lombardo wrote: > > I need to do the following: > > > > if the perl script fails I need to pass a variable to the batch file so it > > can exit with a proper failure message > > when the perl script succe

Re: Passing a variable to a DOS batch file

2002-04-21 Thread Michael Lamertz
On Sat, Apr 20, 2002 at 08:07:09PM -0400, Paul Lombardo wrote: > > I need to do the following: > > if the perl script fails I need to pass a variable to the batch file so it > can exit with a proper failure message > when the perl script succeeds I need to pass a variable to the batch file >

Re: Time being displayed is off my 7 hours

2002-04-21 Thread José Nyimi
Which perl's function (or module) are you using to print out time information ? Could you write down the syntax you are using ? José. - Yahoo! Mail -- Une adresse @yahoo.fr gratuite et en français !

RE: Time being displayed is off my 7 hours

2002-04-21 Thread Timothy Johnson
I figured Wags would have checked, but I just had to ask, because sometimes it's some little thing like that that ends up biting us in the butt. BTW, I should have been clearer, but what I was asking was if the machines were set to the same time zone in the time settings. It does appear that o