fast installing modules

2009-08-18 Thread Jenn G.
Hello, We have a project which has 30+ perl/modperl modules. Installing those modules by hand on each host is wasting time. So can we just copy the directory /usr/lib/perl5/ from the already installed host to any other not installed hosts? We use Linux OS, perl version is 5.8.8. Thanks. -- To

function calling and object calling

2009-08-11 Thread Jenn G.
Hello, When I create a package, and call its methods by both object way and function (exported) way, how to avoid the conflict in arguments passing? for exmaple, package myclass; require Exporter; our @ISA = qw/Exporter/; our @EXPORT = qw/my_method/; sub new { ... } sub my_method {

Re: function calling and object calling

2009-08-11 Thread Jenn G.
On Tue, Aug 11, 2009 at 2:33 PM, Uri Guttmanu...@stemsystems.com wrote: JG == Jenn G practicalp...@gmail.com writes:  JG When I create a package, and call its methods by both object way and  JG function (exported) way, how to avoid the conflict in arguments  JG passing? why are you trying

evaluate for max and min value in array

2009-07-22 Thread Jenn G.
Hello, How to lookup the max and min value in an array? Just like SQL's max() and min() functions. Thanks. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: evaluate for max and min value in array

2009-07-22 Thread Jenn G.
thanks all the suggestions. On Wed, Jul 22, 2009 at 4:32 PM, Shawn H. Coreyshawnhco...@gmail.com wrote: Jenn G. wrote: Hello, How to lookup the max and min value in an array? Just like SQL's max() and min() functions. Thanks. use List::Util qw/min max/; See `perldoc List::Util

Install DBD::Sybase

2009-07-21 Thread Jenn G.
Hello, I follow the steps on this link to install and use DBD::Sybase for MSSQL: http://www.perlmonks.org/?node_id=392385 But when configure I got: BLK api NOT available. Then make got: dbdimp.c:777: error: 'BLK_VERSION_150' undeclared (first use in this function) dbdimp.c:777: error: (Each

Re: Install DBD::Sybase

2009-07-21 Thread Jenn G.
And I tried to install unixODBC but also make failed: g++ -g -O2 -o .libs/ODBCConfig main.o -L/usr/X11R6/lib/qt-3.3.8b/lib /usr/lib/qt-3.3.8b/lib/libqt-mt.so -L/usr/X11R6/lib /usr/lib/libmng.so -ljpeg -lpng -lz -lGL -lXmu -lXrender -lXrandr -lXcursor -lXinerama -lXft /usr/lib/libfreetype.so

Re: Install DBD::Sybase

2009-07-21 Thread Jenn G.
On Tue, Jul 21, 2009 at 9:11 PM, Gurunandan R. Bhatg...@dygnos.com wrote: Ooops - Sorry!! I sent an HTML reply and my links went away. Here is my reply with the links preserved: I assume you have installed the freetds library. Please follow the solutions given here:

help with a regex

2009-07-17 Thread Jenn G.
Hello, I'm not sure if the syntax below is correct: next if /\/0$|^127\./; ( the regex means when meet something like 192.168.1.0/0 or 127.0.0.1 it will be next.) Or do I need to use () to enclose the char at both sides of the | ? next if /(\/0$)|(^127\.)/; Please help, thanks! Regards.

Re: how to choose multiplexing methods in perl

2009-07-14 Thread Jenn G.
On Wed, Jul 15, 2009 at 10:38 AM, XUFENGxufeng...@sina.com wrote: Hi all, I use IO::Socket::INET to program server-client communication.When trying to serve some concurrency,I have some options:        1, multi-threading        2, one daemon process with IO::Epoll which is better? Nothing

one or two alarm(0)

2009-07-13 Thread Jenn G.
Hello, From the code below: eval { local $SIG{ALRM} = sub { die TIMEOUT\n }; alarm($seconds); ... code to execute with timeout here ... alarm(0); # cancel alarm (if code ran fast) }; alarm(0);# cancel alarm (if eval failed) Is the second alarm(0) needed or not? In my

Re: Hi

2009-07-10 Thread Jenn G.
Hi, You may want Expect: http://search.cpan.org/~rgiersig/Expect-1.21/Expect.pod On Fri, Jul 10, 2009 at 3:00 PM, John Somozajohn.som...@gmail.com wrote: I have a general perl question. I'm on OSX running a program from the command line. That program asks a series of questions, which I

Re: Edit a config file using perl cgi script

2009-07-09 Thread Jenn G.
On Thu, Jul 9, 2009 at 5:34 PM, Alpesh Naiknaik.alp...@gmail.com wrote: For eg: below is what I have in the config file configfile.cfg. Key1=OldValue1 Key2=OldValue2 I want to search for Key1 and change OldValue1 to NewValue1 Read the content into memory, search the key (i.e, use a regex)

Perl on VxWorks

2009-07-08 Thread Jenn G.
Hello, Sorry I'm just asking this question for others. Does anyone have the experience of porting Perl on VxWorks OS? Thanks. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Is there a well-written threading TCP server module for perl?

2009-07-08 Thread Jenn G.
On Thu, Jul 9, 2009 at 11:38 AM, XUFENGxufeng...@sina.com wrote: hi all,        Is there a well-written threading TCP server module for perl? I want a module that manages threading itself and utilize Posix Threading for performance. See this class Socket::Class: