答复: Redirecting the output

2010-11-30 Thread gaochong
IO::Tee > -邮件原件- > 发件人: Sooraj S [mailto:soorajspadmanab...@gmail.com] > 发送时间: 2010年11月日 23:14 > 收件人: beginners@perl.org > 主题: Redirecting the output > > Hi, > > Can i redirect the output to a file as well as stdout at the same time...i dont want > to use tee command..i want this to be d

答复: reference to anonymous array, refe rences last element instead??

2009-11-29 Thread gaochong
perldoc perlref Making References References can be created in several ways. 1. By using the backslash operator on a variable, subroutine, or value. (This works much like the & (address-of) opera- tor in C.) This typically creates another reference to a variabl

答复: Regex to get last 3 digits of a number.

2009-11-23 Thread gaochong
But I think substr is better . my $str="0111"; my $r=substr ($str,-3); > -邮件原件- > 发件人: John W. Krahn [mailto:jwkr...@shaw.ca] > 发送时间: 2009年11月日 23:23 > 收件人: Perl Beginners > 主题: Re: Regex to get last 3 digits of a number. > > shadow52 wrote: > > Hey everyone, > > Hello, > >

答复: Regex to get last 3 digits of a number.

2009-11-23 Thread gaochong
substr but you have to set it to be char . can I help you ? > -邮件原件- > 发件人: shadow52 [mailto:ras.collec...@gmail.com] > 发送时间: 2009年11月23日 11:27 > 收件人: beginners@perl.org > 主题: Regex to get last 3 digits of a number. > > Hey everyone, > > I am trying to get just the last 3 numbers from t

答复: the question of one program

2009-11-20 Thread gaochong
{ print pack ("H*",$_) . "\n"; } > -邮件原件- > 发件人: Shlomi Fish [mailto:shlo...@iglu.org.il] > 发送时间: 2009年11月19日 23:24 > 收件人: beginners@perl.org > 抄送: gaochong > 主题: Re: the question of one program > > On Thursday 19 Nov 2009 16:54:00 g

答复: ìö‘` : the question of o ne program

2009-11-19 Thread gaochong
> -邮件原件- > 发件人: Jim Gibson [mailto:jimsgib...@gmail.com] > 发送时间: 2009年11月20日 15:08 > 收件人: gaochong; 'John W. Krahn'; 'Perl Beginners' > 主题: Re: ìö‘` : the question of one program > > At 11:48 AM +0800 11/20/09, gaochong wrote: > >Thanks .

答复: the question of one program

2009-11-19 Thread gaochong
Thanks . But the code is from cpan.org ,and is crappy ,where I will go ? -邮件原件- 发件人: John W. Krahn [mailto:jwkr...@shaw.ca] 发送时间: 2009年11月19日 23:53 收件人: Perl Beginners 主题: Re: the question of one program Shlomi Fish wrote: > On Thursday 19 Nov 2009 16:54:00 gaochong wrote: >> N

a perl code to get the process info ,Your comments and suggestions are welcome

2009-11-19 Thread gaochong
hi all I refer to the following page and correct it somewhole , ,Your comments and suggestions are welcome , thanks . http://www.cpan.org/authors/id/S/SU/SUJAI/Process-Detail-0.1.pl the code: #!/usr/bin/perl use warnings; use strict; use Switch; my $VERSION=0.1; my $d

答复: the question of one program

2009-11-19 Thread gaochong
Shlomi Fish wrote: > On Thursday 19 Nov 2009 16:54:00 gaochong wrote: >> Now I have see the following page ,but I have some question and need help . >> >> http://www.cpan.org/authors/id/S/SU/SUJAI/Process-Detail-0.1.pl >> >> >> the second ,

the question of one program

2009-11-19 Thread gaochong
Now I have see the following page ,but I have some question and need help . http://www.cpan.org/authors/id/S/SU/SUJAI/Process-Detail-0.1.pl first,what is the meaning of if($pcs =~ /(\d+)/ && $pcs =~ /\./) ,I can’t understand the re /\./ sub hidden { print "\n##Hidden processlis

答复: mkdir in the mounted partition,pl ease help me,thanks

2009-11-18 Thread gaochong
y, November 18, 2009 12:39 PM Subject: Re: mkdir in the mounted partition,please help me,thanks > > - Original Message - > From: ""gaochong"" > Newsgroups: perl.beginners > To: > Sent: Tuesday, November 17, 2009 6:41 AM > Subject: mkdir in th

about signal

2009-11-17 Thread gaochong
#!/usr/bin/perl -w use strict; $SIG{INT}=\&stop; $|=1; my $count=3; while ($count) { print "hello\n"; sleep 1; } sub stop { $SIG{INT}=\&stop; -here why set this ? if no ,the result is same . $count--;

答复: mkdir in the mounted partiti on£¬please help me£¬thanks

2009-11-17 Thread gaochong
/dev/sdd1 1.7T 639G 1004G 39% /data6 /dev/sdf1 1.7T 1.1T 578G 65% /data8 -邮件原件- 发件人: John W. Krahn [mailto:jwkr...@shaw.ca] 发送时间: 2009年11月18日 14:12 收件人: Perl Beginners 主题: Re: mkdir in the mounted partition£¬please help me£¬thanks gaochong wrote: > #!/us

答复: 答复: mkdir in the mounted par tition,please help me,thanks

2009-11-17 Thread gaochong
I did not receive err msg . -邮件原件- 发件人: Dermot [mailto:paik...@googlemail.com] 发送时间: 2009年11月17日 20:16 收件人: beginners@perl.org 主题: Re: 答复: mkdir in the mounted partition,please help me,thanks 2009/11/17 gaochong : > but I have uses perl -w。 > any other problem ? Did you recei

答复: mkdir in the mounted partiti on,please help me,thanks

2009-11-17 Thread gaochong
but I have uses perl -w。 any other problem ? -邮件原件- 发件人: Dermot [mailto:paik...@googlemail.com] 发送时间: 2009年11月17日 19:53 收件人: beginners@perl.org 主题: Re: mkdir in the mounted partition,please help me,thanks 2009/11/17 gaochong : > #!/usr/bin/perl -w > > > > #Auther:gaoch

mkdir in the mounted partition,please h elp me,thanks

2009-11-17 Thread gaochong
#!/usr/bin/perl -w #Auther:gaochong use strict; my @list = (3 .. 9); my @FA=("FA0001".."FA2000"); sub mk_fa { my ($f) = @_; foreach my $p (@list) { mkdir "/data$p/NRU/$f",0755 or warn "mkdir /data$p/NRU/$f err:$!"; symlink "/