process snapshot

2007-12-23 Thread lists user
How to get a process's snapshot data in perl like Apache::Scoreboard for apache processes? Happy holidays guys! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

double-bytes characters

2007-11-26 Thread lists user
I'm not so familiar with handling double-bytes characters. I have a string like this (from an email subject): =?gb2312?B?u7bTrdeisuE=?= how to create this string? and how to decode it? Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

help on ip addr

2007-10-26 Thread lists user
Hello, I want to do the things below: a) get all binded IPs on a redhat linux os.there are maybe more than one IP,like eth0,eth1,eth0:1 etc. b) for each IP,I need to know if it's a private network address (like 192.168.0.1) or a public network address. for the first problem I can read

local *FH

2007-10-17 Thread lists user
I saw this code piece in perldoc perldata, sub newopen { my $path = shift; local *FH; # not my! open (FH, $path) or return undef; return *FH; } $fh = newopen('/etc/passwd'); why it say a

double-bars graph

2007-09-19 Thread lists user
Hello, I know how to make graph with GD::Graph::bars. But how can I make the double-bars for each element? I'd like the graph looks as, ip pv |-- -- ip pv |-- -- -- -- |-- -- -- -- |-- -- -- -- |___ 0901 0902 Thank you! -- To unsubscribe, e-mail: [EMAIL

autoload

2007-09-13 Thread lists user
Hello, Why we need AUTOLOAD and what's the usage of $AUTOLOAD? Can you show an example to help explain it?Thanks in advance. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: autoload

2007-09-13 Thread lists user
Really great answer.Thanks Chas. 2007/9/13, Chas Owens [EMAIL PROTECTED]: ... -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

about variables destruction

2007-09-03 Thread lists user
When destructing a variable,one can say `$var = ''` or `$var = undef`,which way is good? like two cases follow, sub DESTROY { my $self = shift; $self-{array} = undef; } or sub DESTROY { my $self = shift; $self-{array} = ''; } Given $self-{array} is a large array's reference.

a division warning

2007-08-26 Thread lists user
I run a perl command below, perl -Mstrict -Mwarnings -e 'eval {my $x=3;my $y=$x-3;$x/$y};print hello' Useless use of division (/) in void context at -e line 1. hello I'm confused about the first warning.What's it?thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: Trying to dynamically create arrays, getting can't use string as ARRAY ref

2007-08-23 Thread lists user
Hi, Rather than a dynamic array,you just need to use a correct datastru,a hash. It's maybe better to write codes as below. [tmp]$ cat groups.txt prod01 456 345 234 prod02 789 517 325 prod03 789 517 325 prod04 789 517 325 prod05 789 517 325 [tmp]$ cat test.pl #!/usr/bin/perl use strict; use