[EMAIL PROTECTED] and [EMAIL PROTECTED]

2007-03-22 Thread Jm lists
Given the case, my @array = (1,2,3,4); my $var1 = [EMAIL PROTECTED]; my $var2 = [EMAIL PROTECTED]; What's the difference between $var1 and $var2? Are they all refered to @array? Thanks guys. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://l

Question about a class

2007-03-18 Thread Jm lists
Hello, Consider this script (coming from Randal's book): { package Animal; sub speak { my $class = shift; print "a $class goes ", $class->sound, "!\n"; } } { package Mouse; @ISA = qw(Animal); sub sound { "squeak" } sub speak { my $class = shift; $class->SUPER::speak(@_); #***t

about reference

2007-03-17 Thread Jm lists
Hello members, What's the difference between Perl's reference and C's pointer? I'm always confused about them.Thanks for any direction. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: about creating an array

2007-03-15 Thread Jm lists
Thanks John.That's the right way. Another question,what's the regex of "\s+\z" ? 2007/3/16, John W. Krahn <[EMAIL PROTECTED]>: Jm lists wrote: > hello lists, Hello, > please see the codes below: > > use strict; > use warnings; > my @arr = (

Re: about creating an array

2007-03-15 Thread Jm lists
AIL PROTECTED]>: Jm lists wrote: > > hello lists, > > please see the codes below: > > use strict; > use warnings; > my @arr = (); > open HD,"itemid.txt" or die $!; > while(){ >chomp; >push @arr,$_; > } > close HD; > > print "@a

Re: about creating an array

2007-03-15 Thread Jm lists
1688 1689 1690 1691 1692 1693 $ perl test.pl 1693 It's really happened to me.So faint! 2007/3/16, Rob Dixon <[EMAIL PROTECTED]>: Jm lists wrote: > > hello lists, > > please see the codes below: > > use strict; > use warnings; > my @arr = (); > open HD,&qu

about creating an array

2007-03-15 Thread Jm lists
hello lists, please see the codes below: use strict; use warnings; my @arr = (); open HD,"itemid.txt" or die $!; while(){ chomp; push @arr,$_; } close HD; print "@arr"; the itemid.txt has 470 lines data,looks like: 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 But

Re: Where can I get the Perl library modules

2007-03-07 Thread Jm lists
Whoops, that is the 64-bit version. This the normal version: http://downloads.activestate.com/ActivePerl/Windows/5.8/ActivePerl-5.8.8.820-MSWin32-x86-274739.msi Do I need to pay for it? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://lea

what's the difference between $1 and \1?

2007-03-06 Thread Jm lists
Hello, $s="hello,test"; the 1st statement: $s=~s/^(\w+)/$1 / the 2nd statement: $s=~s/^(\w+)/\1 / What's the difference between these two statements? Thanks! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

How to get all the files under the webdir?

2007-02-13 Thread Jm lists
Hello lists, I want to get all the files on some a webdir.For example: http://www.foo.com/bar/ But that dir has a default page "index.htm".So when I accessed the url I only got the default page. Can you tell me is there a way to fetch all the files in that dir?Thanks a lot. -- To unsubscribe,

about die's output

2007-02-12 Thread Jm lists
hello,lists, When I said: die "usage: $0 pub|del"; I got this output: usage: xxx.pl pub|del at xxx.pl line 20. Then when I said: die "usage: $0 pub|del\n"; Only the "\n" was added.The output became: usage: xxx.pl pub|del It lost the words of "at xxx.pl line 20.". Why is this?Thank

what's these warnings?

2007-02-08 Thread Jm lists
Hello, I wrote these codes in my CGI scripts: my $percent = sprintf("%.2f\%",$count/$total * 100); Then I print the $percent to web and get the results correctly like: 12.41% But when I looked at error_log,I got many error warnings: Invalid conversion in sprintf: end of string at /home/apach

post file

2007-02-06 Thread Jm lists
Hello, I have a XML file which needed to be posted to a remote site. I have no idea on how to do it.Can you show me some useful reference?Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Help with URI encode

2007-01-04 Thread Jm lists
Hello members, I'm really confused for all the kinds of uri encoding.Can you please help me again about the uri charset below? http://www.example.com/so/index?key=%BD%F1%C8%D5%C5%C5%D0%D0&viewlist=1 what's the encode format for "%BD%F1%C8%D5%C5%C5%D0%D0" ?Thank you. -- To unsubscribe, e-mail:

What's this string?

2006-12-18 Thread Jm lists
http://search.cn.yahoo.com/search?p=%E9%A3%9E%E8%BD%AE%E6%B5%B7%E6%B5%B7%E6%8A%A5&pid=65226_1006&ei=UTF-8 What's the encode format for the "%E9%A3%9E%E8%BD%AE%E6%B5%B7%E6%B5%B7%E6%8A%A5" in above string?I tried some ways but got nothing. Please help,thanks. -- To unsubscribe, e-mail: [EMAIL PRO

What's these warnings?

2006-12-11 Thread Jm lists
Hello members, When I run: $ perl -c myscript.pl perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "en_US.en" are supported and installed on your system. perl: warning: Falling back to

What's this string?

2006-11-28 Thread Jm lists
Hello, Can you tell me what's this string? =?GBK?B?zNSxpszh0NHE+qO6wvS80tLRvq3GwLzbo6zH67vYxsA=?= How to decode it?I try: $ perl -MEncode -le 'print encode("utf8",decode("gbk","=?GBK?B?zNSxpszh0NHE+qO6wvS80tLRvq3GwLzbo6zH67vYxsA=?="))' But I can't get the result correctly. Thanks for your

install libs under private directory

2006-11-15 Thread Jm lists
hello members, I want to install some perl libs under my home dir since I don't have the root privileges. Can you tell me how to do it other than the method of "perl -MCPAN -e shell"?Thanks.

Re: Time format

2006-11-15 Thread Jm lists
Very cool!Thanks. 2006/11/15, Ricardo SIGNES <[EMAIL PROTECTED]>: * Jm lists <[EMAIL PROTECTED]> [2006-11-15T09:57:44] > Hi members, > > I want to get this format of time: > > 11.07.06 12:00 pm > > can you tell me how to get it?(maybe need to be translat

Time format

2006-11-15 Thread Jm lists
Hi members, I want to get this format of time: 11.07.06 12:00 pm can you tell me how to get it?(maybe need to be translated from the 'localtime') Thanks.