Re: @INC

2006-03-13 Thread Sean Davis
If you are using bash as you shell, something like: export PERL5LIB=${PERL5LIB}:/usr/local/project/packages That will set the global search path for perl to find modules to include '/usr/local/project/packages'. However, the better way to handle this is to set up a directory that you use for

referer throwing Internal Server Error

2006-03-13 Thread David Gilden
Greetings from Cow Tow! Here is my little script and it throwing a Internal Server Error #!/usr/bin/perl use CGI qw/:standard/; use CGI::Carp qw(fatalsToBrowser); use POSIX 'strftime'; use strict; my $referer = referer; if ($referer !~ m|^https?://www\.coraconnection\.com|i) {

Re: referer throwing Internal Server Error

2006-03-13 Thread Sara
#!/usr/bin/perl use CGI qw/:standard/; use CGI::Carp qw(fatalsToBrowser); use POSIX 'strftime'; use strict; use warnings; my $q = new CGI; my $referer = $ENV{'HTTP_REFERER'} || 'foo.com'; print $q-header(); if ($referer !~ m|^https?://www\.coraconnection\.com|i) { print Your not authorized:

Re: referer throwing Internal Server Error

2006-03-13 Thread David Dorward
On Mon, Mar 13, 2006 at 07:30:45PM -0600, David Gilden wrote: Here is my little script and it throwing a Internal Server Error Try running it from the command line: h1Software error:/h1 preMissing right curly or square bracket at - line 13, at end of line syntax error at - line 13, at EOF

First-time forking

2006-03-13 Thread Cornelis Swanepoel
hi there, I'm trying to use fork in a script that batch converts my old taped Simpsons episodes to dvd with tovid. This is the first time I've used fork and I'm a bit bewildered by the behaviour exhibited when a child process dies. Basically, I want the main process to fork a list of

Re: First-time forking

2006-03-13 Thread Shawn Corey
Cornelis Swanepoel wrote: The SIG{CHLD} handler doesn't get called since the output from print LOG Child process no. $stiff exited with status $?\n; is missing. It's not missing; it was never there. Your parent process dies before its children are finished. It is no longer around to reap

WebServices + XML doublt

2006-03-13 Thread I BioKid
dear all, am here again with not a beginners question, but am sure this is one of the most active place to check out perl doubts .. we have a web server that gives out put of 2 tables and 2 images. now, we want to provide a webservice for this server - with 4 services, for example getfoo_table2

Re: First-time forking

2006-03-13 Thread Jay Savage
On 3/13/06, Cornelis Swanepoel [EMAIL PROTECTED] wrote: I have found the following text in the perlfork manpage: Calling exec() within a pseudo-process actually spawns the requested executable in a separate process and waits for it to complete before exiting with the same exit status as

Re: Padded 3 digit numeric series

2006-03-13 Thread Ken Stevens
On Sat, 2006-03-11 at 23:04 -0500, Chris Devers wrote: On Sat, 11 Mar 2006, Harry Putnam wrote: Its just the numeric part I need a jump start on. Have you looked at sprintf yet? `perldoc -f sprintf` I tried the perldoc command and I receive the message: Nothing Appropriate. Is there

Re: beginners Digest 13 Mar 2006 05:54:58 -0000 Issue 2791

2006-03-13 Thread Chas Owens
On 3/13/06, Martin [EMAIL PROTECTED] wrote: Hi, I am trying out to get a an attribute value from the given text. Kindly help me out in this regard. Input text: The Bill for this Act of the Scottish Parliament was passed by the Parliament on 15th December 2005 and received Royal Assent

Re: Flushing output

2006-03-13 Thread Tom Phoenix
On 3/13/06, Tommy Grav [EMAIL PROTECTED] wrote: How do I get unbuffered output to a file. It's Perl's secret $| variable. It's in the perlvar manpage, and maybe also check out the one-argument select() in perlfunc. Cheers! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail:

Flushing output

2006-03-13 Thread Tommy Grav
I am writing some output to a file using printf. However this output is buffered. How do I get unbuffered output to a file. Cheers Tommy [EMAIL PROTECTED] http://homepage.mac.com/tgrav/ Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius

Re: Flushing output

2006-03-13 Thread Chas Owens
On 3/13/06, Tommy Grav [EMAIL PROTECTED] wrote: I am writing some output to a file using printf. However this output is buffered. How do I get unbuffered output to a file. Cheers Tommy [EMAIL PROTECTED] http://homepage.mac.com/tgrav/ Any intelligent fool can make things bigger, more

RE: Win32 Module to change local Password on Remote Computers

2006-03-13 Thread Timothy Johnson
Your policies may require that the user be logged on to run this API. A kludgey work-around is to use WMI and Win32_Process to launch a process remotely that makes the password change for you, for example via 'NET USER UserName Password'. Assuming you have administrator access on the remote

Perl script to read IIS ftp log file

2006-03-13 Thread Sonika Sachdeva
Hi, How to read every new file transfer made from the IIS ftp log file. This will be continous file reading process to know the status of every successful file transfer to the server. Thanx,

RE: Perl script to read IIS ftp log file

2006-03-13 Thread Timothy Johnson
Do a search for the Perl Power Tools project. They have an all-Perl implementation of tail that should be right up your alley. -Original Message- From: Sonika Sachdeva [mailto:[EMAIL PROTECTED] Sent: Monday, March 13, 2006 1:27 PM To: beginners@perl.org Subject: Perl script to read

First-time forking frustration

2006-03-13 Thread Cornelis Swanepoel
hi there, I'm trying to use fork in a script that batch converts my old taped Simpsons episodes to dvd. This is the first time I've used fork and I'm a bit bewildered by the behaviour exhibited when a child process dies. Basically, I want the main process to fork a list of children(one for

Installing CPANPLUS

2006-03-13 Thread Kevin Viel
Greetings, Hopefully, this is the appropriate forum. If not, I offer my apologies. I am attempting to install CPANPLUS on a SunBlade 150 running Solaris 9. I do not have root rights. Lynx, wget, ncftpget, and ncftp are not present in my path, nor can I find them in /usr/bin/ or

Re: Perl script to read IIS ftp log file

2006-03-13 Thread JupiterHost.Net
Sonika Sachdeva wrote: Hi, How to read every new file transfer made from the IIS ftp log file. This will be continous file reading process to know the status of every successful file transfer to the server. File::Tail File::Tail::App -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: Perl script to read IIS ftp log file

2006-03-13 Thread Sonika Sachdeva
Hi, Thanx for the response. Is it possible to read a file only for the new lines added as compared to what was read last time. for example i donot wish to parse the file from beginning but only from where i left at the previous perlrun. On 3/13/06, JupiterHost.Net [EMAIL PROTECTED] wrote:

Re: Perl script to read IIS ftp log file

2006-03-13 Thread JupiterHost.Net
Sonika Sachdeva wrote: Hi, Thanx for the response. Is it possible to read a file only for the new lines added as compared to what was read last time. for example i donot wish to parse the file from beginning but only from where i left at the previous perlrun. Yes that is what those modules

Regular expression - Global substitution

2006-03-13 Thread Baskaran Sankaran
Hi Group, Am working with Unicode (UTF8 coded) stuff and facing problem with regular expression. s/(\p{HinNumerals})\s+($tokenize_string)+\s+(\p{HinNumerals})/$1$2$3/g; and, my HinNumerals is defined as, sub HinNumerals { return END; 0966\t096F END }

perl cannot open file which path contain chinese character?

2006-03-13 Thread zhao_bingfeng
hi, all, I have a tk program, I allow user select a file and then I read it. When the file path contain chinese character(of course, I use windows xp simplified chinese version with ActiveState perl 5.8.4), perl complain Invalid argumen or No such file or directory. I know maybe I should use some

Re: First-time forking

2006-03-13 Thread Jeff Pang
The SIG{CHLD} handler doesn't get called since the output from print LOG Child process no. $stiff exited with status $?\n; is missing. You can't see the output in your log is because when your childs are executing,your parent has exited. In order to see the callbacking childs,just add this

Re: First-time forking

2006-03-13 Thread Mr. Shawn H. Corey
Jeff Pang wrote: You can't see the output in your log is because when your childs are executing,your parent has exited. In order to see the callbacking childs,just add this line in the code end: sleep while(1); # parent sleep to wait for childs exiting This would be a bad idea since the

Re: First-time forking

2006-03-13 Thread Jeff Pang
This would be a bad idea since the process never exits. En? I just want to show the childs exiting status. Surely,you could modify it simply to get main process exit normally. for example: # you could get the childs numbers by counting the @files array $CHILD_COUNT=N; # defined the sig