Re: PERL VS MOD_PERL

2007-07-05 Thread Jeff Pang
There are some difference details between them.If you really want to know it,you may first need to see what's mod_perl and how it works.Take a look at: mod_perl official documents: http://perl.apache.org/docs/index.html Why mod_perl by Stas Bekman:

Re: PERL VS MOD_PERL

2007-07-05 Thread Chas Owens
On 7/5/07, Dinesh kumar [EMAIL PROTECTED] wrote: Hi all, can any one tell me what is the difference between perl and mod_perl in detail ?? Four letters (mod_). Seriously, mod_perl is a Perl interpreter built into Apache to enable some efficiency hacks. -- To unsubscribe, e-mail:

Memory leaks with threads

2007-07-05 Thread Michael Scondo
Hi, I'm still trying to get familiar with threads and sockets. However, I got in some troubles with memory leaks, could anyone perhaps give me a hint in which way I should write a multithreaded socket server ? I wrote a small server, which accepts connections on a tcp socket and spawns a new

SWF::Builder ActionScript classpath

2007-07-05 Thread Shannon Scott
Hello, I have been using SWF::Builder to create swf files from actionscript ( .as files ). It works great until I try to use some actionscript with an import statement, then I get this error: Syntax error. ';' is expected. in 1 I don't think there are any issues with the code because it is

Re: foreach broken in my script

2007-07-05 Thread oryann9
--- Randal L. Schwartz [EMAIL PROTECTED] wrote: Jeff == Jeff Pang [EMAIL PROTECTED] writes: Jeff May you need eval?Like, No. Wrong direction for a solution. Don't suggest things like this. Plenty of proper answers elsewhere in the thread, so I won't repeat them. DO NOT USE

Re: foreach broken in my script

2007-07-05 Thread Chas Owens
On 7/5/07, oryann9 [EMAIL PROTECTED] wrote: --- Randal L. Schwartz [EMAIL PROTECTED] wrote: snip DO NOT USE STRING EVAL. EVER. Until you understand why I said that. :) Will you kindly explain the logic/reasoning behind this EVER rule? snip Almost anything you want to do with the string

RE: syntax error of some sort?

2007-07-05 Thread Joseph L. Casale
Chas/Prabu, The script is moving along nicely now:) Incredible how I missed the obvious, although I have been staring at it for so long... Thanks! jlc -Original Message- From: Prabu Ayyappan [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 04, 2007 11:16 PM To: Joseph L. Casale;

Re: SWF::Builder ActionScript classpath

2007-07-05 Thread Tom Phoenix
On 7/5/07, Shannon Scott [EMAIL PROTECTED] wrote: I have been using SWF::Builder to create swf files from actionscript ( .as files ). It works great until I try to use some actionscript with an import statement, then I get this error: Syntax error. ';' is expected. in 1 That's not one of

RE: a question write to file!

2007-07-05 Thread Thomas Bätzler
herostar1981 [EMAIL PROTECTED] asked: I have a big question. why are the contents different between what I write to file and what print in screen? Obviously you are doing something wrong ;-) If you want us to help you, please send a minimal code sample that demonstrates your problem.

Extract year from date field and display the records

2007-07-05 Thread Alma
Hi All, I have to build a search module which takes the parameter as year (ex 2007,2008 etc) ,title subjects. Here is the module sub search { my($year,$author,$conference,$subject) = @_; my $sth1=$dbh-prepare(select date_upload from docs); my $res=$sth1-execute();

Snippet explanation please

2007-07-05 Thread Monty
I'm reading Network Programming with Perl by Lincoln Stein, and I've come across a snippet of code I'mnot quite following: open (WHOFH, who |) or die Can't open who: $!; While (WHOFH) { next unless /^(\S+)/; $who{$1}++; } It's the 'next' line I'm unclear on. I know that results: parse

Re: SOS: a question write to file!

2007-07-05 Thread Tom Phoenix
On 7/5/07, herostar1981 [EMAIL PROTECTED] wrote: why are the contents different between what I write to file and what print in screen? Because of something in your source code. Cheers! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: Snippet explanation please

2007-07-05 Thread John W. Krahn
Monty wrote: I'm reading Network Programming with Perl by Lincoln Stein, and I've come across a snippet of code I'mnot quite following: open (WHOFH, who |) or die Can't open who: $!; While (WHOFH) { 'While' is an error. What the code probably said was 'while' (Perl is case sensitive.)

Re: interpolation of function reference in a here doc

2007-07-05 Thread Brad Baxter
On Jul 2, 9:27 am, [EMAIL PROTECTED] (Rob Dixon) wrote: Gabriel Striewe wrote: What do I do wrong? First of all, the ampersand subroutine designation is outdated and dangerous and it is far better to use the indirect notation for a subroutine call: $hello-() Perl will interpolate only

Re: Snippet explanation please

2007-07-05 Thread Paul Lalli
On Jul 5, 10:49 am, [EMAIL PROTECTED] (Monty) wrote: I'm reading Network Programming with Perl by Lincoln Stein, and I've come across a snippet of code I'mnot quite following: open (WHOFH, who |) or die Can't open who: $!; While (WHOFH) { Please configure your mail/newsreader not to

Re: a question write to file!

2007-07-05 Thread herostar1981
On 7 5 , 11 42 , [EMAIL PROTECTED] (T Baetzler) wrote: Thanks... The following loop is used to format the contents: for my $key (keys %station) { $sta[$k].=Placemark\n visibility0/visibilityname$key/ namedescription![CDATA[hrcenterh3a href=http:// globec.whoi.eduU.S.GLOBEC/a /h3img

Re: SOS: a question write to file!

2007-07-05 Thread herostar1981
Thanks. But I can not understand you. Can you tell me the correct methods? I am not sure what's wrong. And I have spent the whole morning to find the mistake. Please help me... BR, xu On 7 5 , 11 35 , [EMAIL PROTECTED] (Tom Phoenix) wrote: On 7/5/07, herostar1981 [EMAIL PROTECTED] wrote:

Re: Snippet explanation please

2007-07-05 Thread Tom Phoenix
On 7/5/07, Monty [EMAIL PROTECTED] wrote: I'm reading Network Programming with Perl by Lincoln Stein, and I've come across a snippet of code I'mnot quite following: open (WHOFH, who |) or die Can't open who: $!; While (WHOFH) { next unless /^(\S+)/; $who{$1}++; } That should be

Re: Snippet explanation please

2007-07-05 Thread Jenda Krynicky
From: Monty [EMAIL PROTECTED] I'm reading Network Programming with Perl by Lincoln Stein, and I've come across a snippet of code I'mnot quite following: open (WHOFH, who |) or die Can't open who: $!; While (WHOFH) { next unless /^(\S+)/; $who{$1}++; } It's the 'next' line I'm

Re: SOS: a question write to file!

2007-07-05 Thread herostar1981
I am sorry. Can you explain clearly? I don't know what's wrong. Your mean is the script code or the content I want to write to the file? Thanks a lot. Best Regards, xu On 7 5 , 11 35 , [EMAIL PROTECTED] (Tom Phoenix) wrote: On 7/5/07, herostar1981 [EMAIL PROTECTED] wrote: why are the

Re: a question write to file!

2007-07-05 Thread Tom Phoenix
On 7/5/07, herostar1981 [EMAIL PROTECTED] wrote: for (my $i=0;$i=$#data;$i++) { $kml.=Folderopen0/opennamestation/name. $sta[$i]./Folder;} That _might_ be correct. But why does the loop count through the last element of the @data array, when you're processing the @sta array? And did

Re: help with syntax using an if statement

2007-07-05 Thread Daluk
On 5 Jul, 00:24, [EMAIL PROTECTED] (Ken Foskey) wrote: On Wed, 2007-07-04 at 19:00 +0200, Martin Barth wrote: Hi if (($DeviceType eq Switch) || ($DeviceType eq Router) || ($DeviceType eq Hub) || ($DeviceType eq Access point)) what i would like to do is check each device type with

require question

2007-07-05 Thread Robert Hicks
When I see code that starts with: require 5.6.0; Does that mean that the version of Perl can be 5.6.0 and above or that it *has to be* 5.6.0? Robert -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: require question

2007-07-05 Thread Chas Owens
On 7/5/07, Robert Hicks [EMAIL PROTECTED] wrote: When I see code that starts with: require 5.6.0; Does that mean that the version of Perl can be 5.6.0 and above or that it *has to be* 5.6.0? Robert from perldoc -f require VERSION may be either a numeric argument such as 5.006,

Re: require question

2007-07-05 Thread oryann9
When I see code that starts with: require 5.6.0; Does that mean that the version of Perl can be 5.6.0 and above or that it *has to be* 5.6.0? ...that version and above see the output from; perldoc -f require

DBD::Oracle for perl testing issues

2007-07-05 Thread Dan King
I am attempting to install DBD::Oracle for Perl. I am having some difficulties though. During the make test procedure a number of my tests fail. One of them is the 10general.t test. It fails on lines 31 and 32 which has is system(exit 1;), 18, 'system exit 1 should return 256'; is system(exit

Re: a question write to file!

2007-07-05 Thread herostar1981
At this point, if I use following script, I can work as I wish: print Content-type: text/html\n\n; print $kml; Placemark visibility1/visibilitynamestation38/namedescription! [CDATA[hrcenterh3a href=http://globec.whoi.eduU.S.GLOBEC/a / h3img src=http://mapservice-xu.whoi.edu/globec.gif;brP a

Re: Snippet explanation please

2007-07-05 Thread Jenda Krynicky
From: Monty [EMAIL PROTECTED] Thanks for all the replies, both in this group and in separate e- mails. Things have been cleared up. My major misunderstanding was in the fact that $1, $2, etc. can exist outside the RegEx. I previously thought they had to be confined to the expression

Re: a question write to file!

2007-07-05 Thread herostar1981
please... this forum refresh so slowly On 7 5 , 1 06 , [EMAIL PROTECTED] (Tom Phoenix) wrote: On 7/5/07, herostar1981 [EMAIL PROTECTED] wrote: for (my $i=0;$i=$#data;$i++) { $kml.=Folderopen0/opennamestation/name. $sta[$i]./Folder;} That _might_ be correct. But why does

Re: su and password in a Perl script

2007-07-05 Thread Tom Phoenix
On 7/5/07, Lakshmi Sailaja [EMAIL PROTECTED] wrote: I want to automate the following through Perl: su - user and provide password check if the login is successful or not. You'll probably have an easier time using sudo, instead of su; it's made for this sort of thing. See whether yours has the

Re: DBD::Oracle for perl testing issues

2007-07-05 Thread Tom Phoenix
On 7/5/07, Dan King [EMAIL PROTECTED] wrote: I am attempting to install DBD::Oracle for Perl. I am having some difficulties though. During the make test procedure a number of my tests fail. One of them is the 10general.t test. It fails on lines 31 and 32 which has is system(exit 1;), 18,

GetOptions with dynamic set of options

2007-07-05 Thread Ray
Hi, I'm trying to build a generic Parsing Arguments functions that would be driven by an array of possible options that is defined by a specific program. I'm trying to use this feature of GetOptions: my %h = (); GetOptions (\%h, 'length=i'); # will store in $h{length} But what I would like

Proper way to halt a script

2007-07-05 Thread Joseph L. Casale
I am reading perldoc.perl.org and am not understanding exit and die clearly. If I have a conditional in a sub that I want to validate with, what is the correct way to do the following: 1. End the sub and return back to the script without continuing that sub. 2. End the entire

Re: Proper way to halt a script

2007-07-05 Thread rcook
I am reading perldoc.perl.org and am not understanding exit and die clearly. If I have a conditional in a sub that I want to validate with, what is the correct way to do the following: 1. End the sub and return back to the script without continuing that sub. if

Re: Proper way to halt a script

2007-07-05 Thread rcook
I am reading perldoc.perl.org and am not understanding exit and die clearly. If I have a conditional in a sub that I want to validate with, what is the correct way to do the following: 1. End the sub and return back to the script without continuing that sub. if

Re: GetOptions with dynamic set of options

2007-07-05 Thread Ray
On Jul 5, 5:41 pm, [EMAIL PROTECTED] (Tom Phoenix) wrote: If that's the feature you're trying to use, why are you trying to use it like that? It seems to want a reference to a hash and a string, but you give it a hash? Try giving it a reference to a hash and a string, maybe something like