CPAN will shutdown

2018-05-22 Thread Practical Perl
*search.cpan.org is shutting down* For details read Perl NOC . After June 25th this page will redirect to MetaCPAN.org So does as well as Perl?

Re: about serialization

2006-11-07 Thread Practical Perl
Thanks,zentara and others. 2006/11/7, zentara <[EMAIL PROTECTED]>: On Tue, 7 Nov 2006 17:58:47 +0800, [EMAIL PROTECTED] ("Practical Perl") wrote: >I saw a paper about DB_File, > > Three serialization wrappers are currently supported: Data::Dumper, >

about serialization

2006-11-07 Thread Practical Perl
I saw a paper about DB_File, Three serialization wrappers are currently supported: Data::Dumper, Storable, and FreezeThaw. Additional serializers can be supported by writing a wrapper that implements the interface required by MLDBM::Serializer. See the supported wrappers

get week numeration in a year?

2006-09-01 Thread Practical Perl
Hello,list, Is there a fast way to get the week numeration in a year? For example,now it's 35th week in 2006,next week is 36th week of this year then. Thanks.

Re: Time::Local let me faint

2006-08-29 Thread Practical Perl
Thank you,:-) For the intuition I treated '8' as August in Time::Local's method...A low-level mistake. 2006/8/30, Lawrence Statton XE1/N1GAK <[EMAIL PROTECTED]>: Because SEPTEMBER only has thirty days. 0 - January; 1 - February; 2 - March; ... --L -- To unsubscribe, e-mail: [EMAIL PROTEC

Time::Local let me faint

2006-08-29 Thread Practical Perl
Hello,lists, Please see these two lines' output: [$ perl -Mstrict -MTime::Local -le 'print timelocal(0,0,0,31,8,2006)' Day '31' out of range 1..30 at -e line 1 $ perl -Mstrict -MTime::Local -le 'print timelocal(0,0,0,31,7,2006)' 1156953600 I translate the time of '2006-7-31 00:00:00' to unix

What's this error in regex?

2006-06-26 Thread Practical Perl
Hello, I got a warning message from my perl script,it's this: Quantifier follows nothing in regex; marked by <-- HERE in m/? <-- HERE ?/ at ./.pl line 703. The 703st line is in a subroutine,the subroutine is: sub some_sub { my $arg1=shift; my $ok=0; for (@some_global_array)

Socket Problems

2006-05-22 Thread Practical Perl
Hello,lists, We write a simple socket script using IO::Socket module.When this script connect to peer server (both server and my scripts are in the same LAN),it always dropped and print these errors: IO::Socket::INET: connect: Connection refused IO::Socket::INET: connect: Connection timed out H

How to get the file's end-lines?

2006-05-10 Thread Practical Perl
Hello,here, I want to get some numbers of end-lines from a file,under unix shell,I can do: $ tail -2000 file.txt or I can do it in perl script: my $lines = `tail -2000 file.txt`; I want to know,is there a pure perl way to do that without using the 'tail' unix command?

require or use

2006-05-09 Thread Practical Perl
Could anyone tell me what's the difference between 'use' and 'require'? And,is there any difference for these two statements? use Exporter (); require Exporter; Thank you.

Is this correct in perl?

2006-04-08 Thread Practical Perl
Hello, When I receive a signal (for example,TERM or INT) from terminal,I want to get the process exit immediately.But the process have some childs running,so he would tell the childs to exit before he exit.So I write a kill statement (used to kill childs) in parent's signal handler.For example: #

Re: mysql insert errors

2006-04-07 Thread Practical Perl
Thanks for all,I'll try some ways to fit it.

mysql insert errors

2006-04-07 Thread Practical Perl
Hello,all, I wrote a script to insert datas to mysql database.The insert frequency is about 45 times per second. Most of the insert actions are successful,but I still see some errors as follow: DBD::mysql::st execute failed: INSERT command denied to user 'abc'@'192.168.3.10' for table 'rcpt' at .

Re: about return value

2006-03-27 Thread Practical Perl
Thanks all. Again,how about the difference about a pointer and a reference? 2006/3/27, Jay Savage <[EMAIL PROTECTED]>: > > On 3/25/06, Practical Perl <[EMAIL PROTECTED]> wrote: > > Hi,list, > > > > When a subroutine return a value,for example,this value is

about return value

2006-03-25 Thread Practical Perl
Hi,list, When a subroutine return a value,for example,this value is a pointer to an array,which is get defined in this subroutine.When out of the subroutine,some a statement call this subroutine and receive the return value to a variable named as $aaa.Is $aaa a duplicate of the pointer in that sub

Does this script have the efficiency problems?

2006-03-09 Thread Practical Perl
Hello, I have a script,which run well at most time.This day I use it to analyse the files of 1.7G,it become very slow and can't get executed continuely anymore.When I run 'strace -p ' (here is this script's PID),there is no output,it seems died. Here is my script: #!/usr/bin/perl use st