Working with Log Files

2002-11-30 Thread Tim Martin
My new manager wants me to learn perl and start with understanding logs files from 50 plus servers. I hope I have sent this message to the correct perl form. I have a sample of the logs below that need to be fixed using perl. Any ideas or suggestion will be helpful. = Start of log sam

Re: limiting resource in regex matching

2002-11-30 Thread David Garamond
david wrote: The Perl book (I think it's the Programming Perl) has an example where a certain reg. exp and string combination can make Perl's reg. engine run forever (in terms of years!) because of backtracking. The solution the book generally recommand is to use one of the newer reg. exp exten

Directing output

2002-11-30 Thread Dennis LaPine
What would be the cleanest way to direct the output to two separate pages? I have two identical pages, the second page auto refreshes and I'd like any new post's from the main page to appear on the auto refresh page. Would a $pull be in order here, or edit the script that runs the main page? Any h

Re: limiting resource in regex matching

2002-11-30 Thread david
David Garamond wrote: > i'm creating a web interface for users to add their own mail filtering > rules. the rules allow them to specify regexes to match headers and mail > body. however, i'm a little concerned with how users can accidentally/ > intentionally use too complex regexes like this "(a+.

RE: how do i make a script run for a certain period of time?

2002-11-30 Thread david
Nyimi Jose wrote: > I'm writing a script that has to be automatically > executed every day at 6:00 AM via 'dollar universe' scheduler software. > I want my script to stop itself at 23:00 PM > (I think to timeout via alarm function). > The script is mainly a while(1) loop and I want my loop > to sl

use Socket

2002-11-30 Thread dan
How is it possible to bind the Socket module to another IP, other than the box's default IP? I want the perl program to connect using a configurable IP that's available on the box. I've read though the perldoc for the module, and couldn't find anything (if there is something there then I missed it)

Re: reverse?

2002-11-30 Thread Rob Dixon
Chris scalar reverse "forwards" is the same as scalar reverse ( "forwards" ) It explicitly puts the call to reverse() into scalar context. Whereas reverse scalar "forwards" is the same as reverse ( scalar "forwards" ) which only forces the already scalar string "forwards" to

Re: reverse?

2002-11-30 Thread Paul Johnson
On Sat, Nov 30, 2002 at 09:55:19PM -, Chris Game wrote: > In an earlier post, Paul Johnson wrote: > > > On Sat, Nov 30, 2002 at 09:26:29PM -, Chris Game wrote: > > > >> Can anyone explain why > >> perl -e 'print reverse "forwards" ' prints "forwards"; and to get > >> what I want I have to

Re: reverse?

2002-11-30 Thread Chris Game
In an earlier post, Paul Johnson wrote: > On Sat, Nov 30, 2002 at 09:26:29PM -, Chris Game wrote: > >> Can anyone explain why >> perl -e 'print reverse "forwards" ' prints "forwards"; and to get >> what I want I have to use >> perl -e 'print $var= reverse "forwards" ' which yields "sdrawrof"

Re: reverse?

2002-11-30 Thread Paul Johnson
On Sat, Nov 30, 2002 at 09:26:29PM -, Chris Game wrote: > Can anyone explain why > perl -e 'print reverse "forwards" ' prints "forwards"; and to get what I > want I have to use > perl -e 'print $var= reverse "forwards" ' which yields "sdrawrof" ? Why > do I have to introduce the extra variable

reverse?

2002-11-30 Thread Chris Game
Can anyone explain why perl -e 'print reverse "forwards" ' prints "forwards"; and to get what I want I have to use perl -e 'print $var= reverse "forwards" ' which yields "sdrawrof" ? Why do I have to introduce the extra variable just to get the print I was after? -- ==

Re: How to get Page Has Expired message

2002-11-30 Thread Rob Dixon
Checking the 'Referer' header field lets you see which page they've linked from, although hitting the 'back' button may not pass a referrer at all. You would have to make sure that the field existed /and/ that it was the correct page to be linking from. HTH, Rob - Original Message - Fro

How to get Page Has Expired message

2002-11-30 Thread LRMK
I want to make visitors see "page has expired" when they click the back button of browser how do I do it?

Re: HTML::SimpleLinkExtor

2002-11-30 Thread Rob Dixon
Nandita One more thing. Your line $ua->requests_redirectable ( ['POST'] );# Add METHOD POST for redirection does what you want, but also /removes/ GET and HEAD from the list of redirectable methods. It would be tidier to leave them in, even though (for now) you're not using them. You

Re: HTML::SimpleLinkExtor

2002-11-30 Thread Rob Dixon
Nandita You're trying to use the as_string method to obtain the HTML to pass to the parser. Firstly as_string will include all of the HTTP response headers, which you don't want, so use $response->content like this: my $linkparser = HTML::SimpleLinkExtor->new;# Create SimpleLinkExtor obje