Re: Is comp.lang.perl dead?

2012-10-22 Thread pangj
于 2012-10-22 19:28, Danny Gratzer 写道: I'm looking at comp.lang.perl and it doesn't seem like it's had new posts in well, years. Is it dead? If so are there any other good perl groups you'd recommend? Perl has so long history so it has many lists for special fields rather than a main one. You

Re: Help with the can() method

2012-09-12 Thread pangj
Sorry this is just my typo. 于 12-9-12 下午10:10, Paul Anderson 写道: Did you copy and paste that code? Do you know that when calling can() you are using $ojb instead of $obj? Paul Anderson -- VE3HOP -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-ma

Help with the can() method

2012-09-12 Thread pangj
Hi, Today I wrote a script for validate a dns record from the specified DNS server, the subroutine is: sub validate_dns { my $host = shift; # a host, for example, www.google.com my $value = shift; # the host's DNS value, may be a CNAME or an iP address my $dns = shift; # DNS server

Re: Recommendations for emacs customizations for editing Perl

2012-09-11 Thread pangj
Have been coding perl with VIM always. I'd like to hear some recommendations from this list for customizations to emacs for coding Perl. One seemingly respected site, http://emacswiki.org/emacs/PerlLanguage, has a lot of links but unfortunately some are pretty dated. For example, the Perl D

Re: How to send RPCs to a Network server using Perl

2012-09-07 Thread pangj
The simple way is to write a web service with Soap, or Thrift which I am familiar with. Thus the client could use the perl http library like LWP::UserAgent. > I am planning to design a simple client application to execute RPC (Remote > Procedure Call) on a remote server. > > All I have managed to

Re: subroutine in seperate file, question

2012-08-10 Thread pangj
> I mean to ask, wether they will clash with the same loaded modules loaded > in calling script? > No. they are loaded only once. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: subroutine in seperate file, question

2012-08-10 Thread pangj
Yes, the modules in required file will be loaded. $ cat ext.pl use CGI; use DBI; 1; $ cat main.pl require 'ext.pl'; use Data::Dumper; print Dumper \%INC; Thus run perl main.pl to see what prints. > i want to keep a peice of code which uses CGI and DBIx module in a > seperate file, and want t

Re: Forking question

2012-08-10 Thread pangj
> > Hi, > > I'm working on a forking process and I need a way to check if any of the > processes have failed and if they have restart them. Can anyone point me > in the right direction to a tutorial or explanation of how to do this? > Or use a server framework like POE which manages forking for y

Re: how to only read the files last 13 lines

2012-06-11 Thread pangj
How to read the files last 13 lines, only process the data of the last 13 lines, ignore the head parts. Thanks with best regards, Try File::Tail, this is might what you are looking for: use File::Tail; my $file=File::Tail->new(name=>"file.txt", tail=>13); while (defined(my $line=$file->re

Re: Unfamiliar calling of a subroutine

2012-06-07 Thread pangj
Would someone be so kind as to explain the following, or at least point me to further reading? $item = $main::global->{open}->{catalog}->SurfDB::split_line($main::global->{form}->{'itemid'}); That's Perl OO programming. You may want to read this book: http://shop.oreilly.com/produc

Re: Comparing two arrays

2012-06-06 Thread pangj
Try Array::Diff http://search.cpan.org/~typester/Array-Diff-0.07/lib/Array/Diff.pm Hi, I have two arrays that I need to compare, and then print the differences: @array1 contains this: /dev/sdmt1 /c4devpr64 /dev/sdmq1 /c4devpr66 /dev/sdmp1 /c4devpr67 /dev/sdml1 /c4devpr69 @array2 contains t

Re: Fw: [MailServer Notification]Web Reputation Notification

2012-06-05 Thread pangj
I keep receiving these bounces due to posts I make tobeginn...@perl.org. It seems that it is a mail filter on the pearsontc.com domain (though I don't know the username there). Can this be fixed? I didn't get that bounce. Try remove the signature from your message and redeliver it to find the

Re: mod_perl for n00bs

2012-06-04 Thread pangj
I want to understand why Mark thinks he needs mod_perl. If it's just because he wants to speed up his app (soup up the engine) there might be things he can do that don't require rewriting a lot of code, or spending a lot of time learning a lot of new ways of doing things. Me second. If the

Re: problem install XML::LibXSLT on RHEL

2012-06-03 Thread pangj
*2) Now I am trying to install libxslt when I run ./configure* It gives me the following error even though i have 2.6.28 lib avaiable on /usr/local/lib. checking for libxml libraries>= 2.6.27... configure: error: Version 2.6.26 found. You need at least libxml2 2.6.27 for this version of libxslt

Re: mod_perl for n00bs

2012-06-03 Thread pangj
There are some books listed there: http://perl.apache.org/docs/offsite/books.html#Books_mentioning_mod_perl Also you may want to join the modperl mailing list, that's an active list with many MP developers there. http://perl.apache.org/maillist/modperl.html Regards. What is the best book/tu

Re: Help required to extract multiple text fields from a text string

2012-05-26 Thread pangj
There are many cases prove that, I am just lazy to find one. You don't know it, so it's nonsense? Message Received: May 26 2012, 01:58 PM From: "Rob Dixon" To: beginners@perl.org Cc: pa...@fsmail.net Subject: Re: Help required to extract multiple tex

Re: Help required to extract multiple text fields from a text string

2012-05-26 Thread pangj
split is slower than the correct regex matching. Message Received: May 26 2012, 10:59 AM From: "Dr.Ruud" To: beginners@perl.org Cc: Subject: Re: Help required to extract multiple text fields from a text string On 2012-05-25 22:51, Christopher Gra

RE: Help required to extract multiple text fields from a text string

2012-05-25 Thread pangj
May you try this matching? while() { next unless /^(\S+\s+)(\S+\s+)(\S+\s+).*\"(.*?)\"/; print "$1 $2 $3 $4\n"; } HTH. Message Received: May 25 2012, 09:52 PM From: "Christopher Gray" To: beginners@perl.org Cc: Subject: Help required to ex

run Javascript from Perl

2011-06-28 Thread pangj
What's the right module to call a browser kernel (for example, the IE) to run Javascript? thanks. Une messagerie gratuite, garantie à vie et des services en plus, ça vous tente ? Je crée ma boîte mail www.laposte.net -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional comm

Re:Links to perldoc in pdf

2011-06-28 Thread pangj
Download it with both HTML and PDF files: http://perldoc.perl.org/perldoc.tar.gz > Message du 27/06/11 23:42 > De : "Peng Yu" > A : "Perl Beginners" > Copie à : > Objet : Links to perldoc in pdf > > Hi, > > perldoc.perl.org has the perl document in pdf format. But I don't find > a webpage

Re: rmdir

2011-06-27 Thread pangj
" > A : pa...@laposte.net > Copie à : "Irfan Sayed" , "Perl Beginners" > Objet : Re: rmdir > > Hi Pangj, > > On Mon, 27 Jun 2011 14:07:51 +0100 > pa...@laposte.net wrote: > > > > > Won't system "rm -rf /path/to/dir"

Re: rmdir

2011-06-27 Thread pangj
Won't system "rm -rf /path/to/dir" just work for you? > Message du 27/06/11 13:59 > De : "Irfan Sayed" > A : "Shlomi Fish" > Copie à : "Perl Beginners" > Objet : Re: rmdir > > i did that but no luck > is there any another way ? > > regards > irfan > > > >

Aw: Re: Eval scoping question

2009-12-08 Thread pangj
n"; > > } > > > > asub("abc"); # prints: I see main::asub("abc") > > > > And how will this help? The OP wanted to call a method by the name of "asub" > Well, the OP said the method name is changing during the running time, so he

Re: PDF generation from a database!!

2009-08-29 Thread pangj
?? ficovh ? Hi folks I need ideas, suggest for generating a report in .pdf from a data containing in a MySQL database. Basically, the idea is putting information from many tables in a simple concentrate report. I want tutos, or simple scripts for doing this task. You want to read datas from