RE: 1, random; 2, unicode

2006-12-27 Thread zhao_bingfeng
> -Original Message- > From: Adriano Allora [mailto:[EMAIL PROTECTED] > Sent: Thursday, December 28, 2006 3:24 AM > To: beginners@perl.org > Subject: 1, random; 2, unicode > > hi to all, > > two questions: > > 1) I need to extract a random item from an hash, does exist a > function > to do

RE: HoA building

2006-12-27 Thread zhao_bingfeng
> -Original Message- > From: M. Lewis [mailto:[EMAIL PROTECTED] > Sent: Wednesday, December 27, 2006 3:36 PM > To: beginners@perl.org > Subject: HoA building > > I have the following simple script. I'm toying with HoA for the first > time. The script is not working as expected and I know

RE: what's your most favourite feature of perl?

2006-12-24 Thread zhao_bingfeng
Well, if I'm allowed select more than one, I will add regular expressions and context semantics. Regex support of perl is the de facto standard, power and easy use. The context semantics make perl do just as I want to do. bingfeng > -Original Message- > From: Todd W [mailto:[EMAIL PROTECT

what's your most favourite feature of perl?

2006-12-24 Thread zhao_bingfeng
Just a simple survey. As a perl fan, I'd like know what's make you are so enthusiastic with perl. As for me, I vote the smart data structure design:) --- There is only one thing more painful than learning from experience and that is not learning

Is perl has any variables and other implementments?

2006-09-11 Thread zhao_bingfeng
I love perl, and perl is the first tool when I want to do something. So I'd like embedded perl in my own editor as a line-based script language so I can manipulate edited text of current editor buffer easily though perl's power and simple features. I need perl core(regex, data structure, etc.) and

答复: How to write an integer to socket

2006-09-06 Thread zhao_bingfeng
yeah, I know, thanks for clue, I just cannor remember the functions. :) > -邮件原件- > 发件人: Adriano Ferreira [mailto:[EMAIL PROTECTED] > 发送时间: 2006年9月7日 11:01 > 收件人: [EMAIL PROTECTED]; beginners@perl.org > 主题: Re: How to write an integer to socket > > On 9/7/06, Adriano Ferreira <[EMAIL PR

How to write an integer to socket

2006-09-06 Thread zhao_bingfeng
Hi, guys In a udp socket test routine, I want to write some integers to server in network order. But unfortunately, my server receive just chars! how can I do? My code: #! /usr/bin/perl use IO::Socket; $sock = new IO::Socket::INET (PeerAddr => '192.168.89.166', Pee

perl cannot open file which path contain chinese character?

2006-03-13 Thread zhao_bingfeng
hi, all, I have a tk program, I allow user select a file and then I read it. When the file path contain chinese character(of course, I use windows xp simplified chinese version with ActiveState perl 5.8.4), perl complain "Invalid argumen" or "No such file or directory". I know maybe I should use so

答复: I found perlcc(distributed w ith ActiveState Perl) is useless mostly :(

2006-03-10 Thread zhao_bingfeng
smime.p7m Description: S/MIME encrypted message

I found perlcc(distributed with ActiveState Perl) is useless mostly :(

2006-03-09 Thread zhao_bingfeng
I wrote some perl programs and want to use perlcc compiles them to .exe files, I get easily crashed results after long time wait. I feel if I use a little complex data structures, such as hash of array, it will get in problems; of source, little script such as "hello world" is OK. I don't kn

答复: how to rewind file?

2006-03-09 Thread zhao_bingfeng
That's great, I also found doc about this function, thank you, Tom and Ryan > -邮件原件- > 发件人: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 代表 > Tom Phoenix > 发送时间: 2006年3月10日 12:21 > 收件人: [EMAIL PROTECTED] > 抄送: beginners@perl.org > 主题: Re: how to rewind file? > > On 3/9/06, [EMAIL PROTEC

how to rewind file?

2006-03-09 Thread zhao_bingfeng
After I use <> operator on s file handle, I need read it from head again. I found these is no rewind function, must I close it and open again?   ---Life is a different teacher... It doesn't teach lessons, and then keep exams... It keeps the exams

答复: the way to get current index of an arr ay

2006-02-28 Thread zhao_bingfeng
> -邮件原件- > 发件人: JupiterHost.Net [mailto:[EMAIL PROTECTED] > 发送时间: 2006年2月28日 21:54 > 收件人: beginners@perl.org > 主题: Re: the way to get current index of an array > > > > [EMAIL PROTECTED] wrote: > > hi, perlers, > > Howdy, Thanks or your and others reply > > > Is there a simple way

the way to get current index of an array

2006-02-27 Thread zhao_bingfeng
hi, perlers, Is there a simple way to get the current index of an array in loop statement? the procondition is you cannot get this information from array element. For example   #!usr/bin/perl my @arr = qw/a b c d e/; for(@arr) {     print "The No.?? element is $_\n"; }   --