creepy print() that doesnt print.

2006-12-13 Thread Gregory Machin
Hi please could you have a look and see what I have missed. use File::Tail; my $name=/etc/openvpn/logs/CT-NET.log; my $maxinterval=10 ; my $adjustafter=7 ; $file=File::Tail-new(name=$name, maxinterval=$maxinterval, adjustafter=$adjustafter); while (defined($line=$file-read)) { print

Re: creepy print() that doesnt print.

2006-12-13 Thread D. Bolliger
Gregory Machin am Mittwoch, 13. Dezember 2006 12:08: Hi Hello Gregory please could you have a look and see what I have missed. use strict; use warnings; # and declare variables with 'my' where missed use File::Tail; my $name=/etc/openvpn/logs/CT-NET.log; my

Perl/MySQL Email Newsletter

2006-12-13 Thread Nigel Peck
Hi, I need to setup an email newsletter system in Perl/MySQL. I had a look around and couldn't see any open source software that fits the bill. Any suggestions? If I was to write it myself, what's the best way to seup a Perl script to accept and handle incoming emails?

use Net::SMTP with Exchange server

2006-12-13 Thread OXx
Hello all, I would like to know if it possible to use Net:smtp module with a Exchange Server. In fact , I think with Exchange Server, we have a SMTP authentification so a simple perl script whithout authentification does not work. Could I use auth parameters? If someone has an example and can

Re: Line ending with Gary^M on UNIX

2006-12-13 Thread Oleg V. Volkov
Ron Wingfield [EMAIL PROTECTED] wrote: [skip] while (defined($line = INFILEHANDLE)) { $line =~ s/\r//g; printf OUTFILEHANDLE (%s), $line; } Why not this one? $line =~ s/\r$//; I didn't see anything about removing ^M anywhere in original post, only at end of line. -- Oleg

A fork problem

2006-12-13 Thread Dukelow, Don
I got this basic fork code right out of the book. It is suppose to wait for both child forks to finish before the parent falls through and excute the code after this if statement. But which ever child finishes first the parrent will fall through and finish before all the children are done. So

Re: use Net::SMTP with Exchange server

2006-12-13 Thread Jenda Krynicky
From: OXx [EMAIL PROTECTED] I would like to know if it possible to use Net:smtp module with a Exchange Server. In fact , I think with Exchange Server, we have a SMTP authentification so a simple perl script whithout authentification does not work. Could I use auth parameters?

Re: use Net::SMTP with Exchange server

2006-12-13 Thread OXx
Hello, Thanks for your answer, I will use Mail::Sender But which authentication could I use ? NTLM ? Best Regards OxXo 2006/12/13, Jenda Krynicky [EMAIL PROTECTED]: From: OXx [EMAIL PROTECTED] I would like to know if it possible to use Net:smtp module with a Exchange

Re: A fork problem

2006-12-13 Thread John W. Krahn
Dukelow, Don wrote: I got this basic fork code right out of the book. Which book? It is suppose to wait for both child forks to finish before the parent falls through and excute the code after this if statement. But which ever child finishes first the parrent will fall through and

Re: reg exp continued need pulled from reference

2006-12-13 Thread Derek B. Smith
--- Lawrence Statton XE2/N1GAK [EMAIL PROTECTED] wrote: If you're dealing with variable length strings, separated by some kind of character, then regexp is the tool you want, not substr. This snippet will work so long as hostname and platform name are made up of \w ... if not, substitute

sort question

2006-12-13 Thread Jason Roth
I was reading the perldoc for the sort function and I had a few questions. http://perldoc.perl.org/sort.html says that large arrays will be shuffled to ensure nlgn runtime. What is the cutoff for large arrays and is there a reason that it isn't simply using a randomized quicksort? Also

RE: reg exp continued need pulled from reference

2006-12-13 Thread Charles K. Clarkson
Derek B. Smith mailto:[EMAIL PROTECTED] wrote: : I then tried Try something simpler, not more complex. Test this case. my @hosts = ( 'sun' ); $worksheet-write_col( 'A2', [EMAIL PROTECTED], $sheet_format ); If it fails testing then there may be a problem with write_col() or with the

Re: reg exp continued need pulled from reference

2006-12-13 Thread Lawrence Statton XE2/N1GAK
--- Lawrence Statton XE2/N1GAK [EMAIL PROTECTED] I am using Spreadsheet::WriteExcel to populate certain columns which is working, but in column A for example I am using the method write_col which requires a reference, Not just a reference but an ARRAY reference for all the values that will

Re: reg exp continued need pulled from reference

2006-12-13 Thread Derek B. Smith
--- Lawrence Statton XE2/N1GAK [EMAIL PROTECTED] wrote: --- Lawrence Statton XE2/N1GAK [EMAIL PROTECTED] I am using Spreadsheet::WriteExcel to populate certain columns which is working, but in column A for example I am using the method write_col which requires a reference, Not

RE: reg exp continued need pulled from reference

2006-12-13 Thread Derek B. Smith
--- Charles K. Clarkson [EMAIL PROTECTED] wrote: Derek B. Smith mailto:[EMAIL PROTECTED] wrote: : I then tried Try something simpler, not more complex. Test this case. my @hosts = ( 'sun' ); $worksheet-write_col( 'A2', [EMAIL PROTECTED], $sheet_format ); If it fails

Re: sort question

2006-12-13 Thread John W. Krahn
Jason Roth wrote: I was reading the perldoc for the sort function and I had a few questions. http://perldoc.perl.org/sort.html says that large arrays will be shuffled to ensure nlgn runtime. What is the cutoff for large arrays and is there a reason that it isn't simply using a randomized

reg exp continued need pulled from reference

2006-12-13 Thread Derek B. Smith
I want to extend any apologies necessary for my last post. I am not a violent person its just I get annoyed when some people are negative, or to me, are condescending. I was not mad just upset and bothered. No biggy and the past is in the past. : ) -- To unsubscribe, e-mail: [EMAIL PROTECTED]

Re: sort question

2006-12-13 Thread Jason Roth
Ok, for those interested the threshold for shuffling is 256 elements. Though I'm still confused on shuffling vs. random quicksort, I imagine thats a question only the person who implemented it can answer. And thanks for the clarification on lists vs arrays. On 12/13/06, John W. Krahn [EMAIL

Modify several files in a directory....

2006-12-13 Thread Brad Grandorff
I have managed to get a one liner working for modifying a particular file in a directory, and I have also used arrays to read in then modify a particular file... but I can't seem to do so using opendir and reading in several files at once... Basically I want to search several files within a

Re: Modify several files in a directory....

2006-12-13 Thread D. Bolliger
Brad Grandorff am Donnerstag, 14. Dezember 2006 01:58: I have managed to get a one liner working for modifying a particular file in a directory, and I have also used arrays to read in then modify a particular file... but I can't seem to do so using opendir and reading in several files at

test message

2006-12-13 Thread derek smith
This is a test... : ) - Have a burning question? Go to Yahoo! Answers and get answers from real people who know.

Re: test message

2006-12-13 Thread Tom Phoenix
On 12/13/06, derek smith [EMAIL PROTECTED] wrote: This is a test... : ) I'm sorry to report that your test failed: It went out to the list, but it had 0% relevant content. Your score is 1 out of a possible 100. Better luck next time! --Tom Phoenix Stonehenge Perl Training -- To

Re: Modify several files in a directory....

2006-12-13 Thread Jeff Pang
Given the filename is ended with .txt,you may try this way. $ cd /your/dir $ perl -pi -nle 's/foo/bar/' *.txt This will replace 'foo' with 'bar' in all *.txt file in current dir. Good luck. -Original Message- From: Brad Grandorff [EMAIL PROTECTED] Sent: Dec 14, 2006 8:58 AM To:

Re: reg exp continued need pulled from reference

2006-12-13 Thread Dr.Ruud
Lawrence Statton XE2/N1GAK schreef: @{$aref2}[0] is 'sun' ITYM: ${$aref2}[0] is 'sun' -- Affijn, Ruud Gewoon is een tijger. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response