Re: last

2013-06-28 Thread Charles DeRykus
On Thu, Jun 27, 2013 at 10:20 PM, shawn wilson wrote: > >... > > True. But, "do" should probably draw a more explicit caution in the docs > > since there are less tricky ways in most cases. > > > > However, there may be a few places when 'do' isn't always a don't :) > > > > 'do' might be a short

Re: last

2013-06-28 Thread Dr.Ruud
On 28/06/2013 09:08, Charles DeRykus wrote: [...] I was making a case that "do" in limited cases could be a shorter and/or slightly clearer idiom. I think the context was if you would ever go as far as using double braces to make a loop-construct out of 'do'. But even more how combining a

Re: printing content of a pipe

2013-06-28 Thread Shlomi Fish
Hi Rajeev, see below for some comments on your code. On Thu, 27 Jun 2013 15:07:50 -0700 (PDT) Rajeev Prasad wrote: > in the below code I am not able to print anything except whatever is in the > $pty.  I want to print LINE_START: in the beginning of each line of the > output, but it does not pr

Re: printing content of a pipe

2013-06-28 Thread *Shaji Kalidasan*
Rajeev, Adhering to the thought process of Shlomi, if you are using Perl version 5.12 and higher, you can use OO methods directly  In 5.12 and above, all file handles are automatically blessed into the IO::File class, and you can use IO::File methods on them whenever you need to. As IO::File i

Re: REG: How to add perl repository in PPM

2013-06-28 Thread sisyphus1
From: Anitha Sreejith Victor Please suggest with the steps to add number of available perl repositories in PPM->edit->preferences->repository. I also tried to add the same , but ended up with 401 Authorization required. Which repositories were you trying to add when you got the 401 error ? I

Re: printing content of a pipe

2013-06-28 Thread Rob Dixon
On 28/06/2013 02:32, Uri Guttman wrote: you don't need ever to set $| on stderr as it is not buffered like stdout is. and you rarely need to set it on stdout as any print with a \n will flush stdout. That isn't true. Perl will buffer STDOUT up to 8KB regardless of whether a newline has been p

Re: REG: How to add perl repository in PPM

2013-06-28 Thread Алексей Мишустин
2013/6/27 Anitha Sreejith Victor : > Hi All, > > Please suggest with the steps to add number of available perl repositories > in PPM->edit->preferences->repository. > > I also tried to add the same , but ended up with 401 Authorization required. 1. Fill in "Name" field 2. Fill in "Location" field

Has AnyEvent::DNS max request limit?

2013-06-28 Thread chenlin rao
I want to use AnyEvent::DNS to resolve my domain on some DNS servers. The server list are got from two place, each about 60+ servers. When I run resolve for only one serverlist,no problem.But if I run resolve for all list, I got an error: "unable to create either an IPv4 or an IPv6 socket". My scr

Has AnyEvent::DNS max request limit?

2013-06-28 Thread chenlin rao
I want to use AnyEvent::DNS to resolve my domain on some DNS servers. The server list are got from two place, each about 60+ servers. When I run resolve for only one serverlist,no problem.But if I run resolve for all list, I got an error: "unable to create either an IPv4 or an IPv6 socket". My scr

Re: REG: How to add perl repository in PPM

2013-06-28 Thread Octavian Rasnita
Or ppm rep add rep_name rep_url --Octavian - Original Message - From: "Алексей Мишустин" To: Sent: Friday, June 28, 2013 2:16 PM Subject: Re: REG: How to add perl repository in PPM > 2013/6/27 Anitha Sreejith Victor : >> Hi All, >> >> Please suggest with the steps to add number of av

Re: last

2013-06-28 Thread Shawn H Corey
On Fri, 28 Jun 2013 10:21:43 +0200 "Dr.Ruud" wrote: > In a serious environment, code should be readable much more than > writable. So spend the extra minutes to make it as clear and > non-ambiguous as you can. Then someone else can more easily fix any > bugs you introduced, without having to as

Re: printing content of a pipe

2013-06-28 Thread Shawn H Corey
On Fri, 28 Jun 2013 11:57:24 +0100 Rob Dixon wrote: > On 28/06/2013 02:32, Uri Guttman wrote: > > > > you don't need > > ever to set $| on stderr as it is not buffered like stdout is. and > > you rarely need to set it on stdout as any print with a \n will > > flush stdout. > > That isn't true. >

Re: printing content of a pipe

2013-06-28 Thread shawn wilson
On Jun 28, 2013 9:24 AM, "Shawn H Corey" wrote: > > On Fri, 28 Jun 2013 11:57:24 +0100 > Rob Dixon wrote: > > > On 28/06/2013 02:32, Uri Guttman wrote: > > > > > > you don't need > > > ever to set $| on stderr as it is not buffered like stdout is. and > > > you rarely need to set it on stdout as

Re: printing content of a pipe

2013-06-28 Thread Rajeev Prasad
Shlomi/Uri, what do you mean by 'It's a good idea not to use "select" on filehandles like that because it willaffect the default filehandle permanently.'? I am using perl 5.14 ty. From: Shlomi Fish To: perl list Sent: Friday, June 28, 2013 4:48 AM Subject:

Re: last

2013-06-28 Thread Charles DeRykus
On Fri, Jun 28, 2013 at 1:21 AM, Dr.Ruud wrote: > On 28/06/2013 09:08, Charles DeRykus wrote: > > [...] I was making a case that "do" in limited cases could be a >> >> shorter and/or slightly clearer idiom. >> > > I think the context was if you would ever go as far as using double braces > to

Re: accessing variables in subroutines

2013-06-28 Thread lee
timothy adigun <2teezp...@gmail.com> writes: use strict; use warnings; sub test { print $counter . "\n"; } my $counter = 0; while($counter < 5) { test(); $counter++; } It says "Global symbol "$counter"

Re: accessing variables in subroutines

2013-06-28 Thread Shlomi Fish
Hi Lee, On Fri, 28 Jun 2013 15:15:27 +0200 lee wrote: > timothy adigun <2teezp...@gmail.com> writes: > > use strict; > use warnings; > > > sub test { > print $counter . "\n"; > } > > > my $counter = 0; > while($counter < 5) { >

Re: printing content of a pipe

2013-06-28 Thread Shlomi Fish
On Fri, 28 Jun 2013 07:37:57 -0700 (PDT) Rajeev Prasad wrote: > Shlomi/Uri, > what do you mean by 'It's a good idea not to use "select" on filehandles like > that because it willaffect the default filehandle permanently.'? shlomif@lap:~$ cat Test.pl #!/usr/bin/perl use strict; use warnings; us

Re: printing content of a pipe

2013-06-28 Thread Rajeev Prasad
i see, it changes 'destination' for the rest of the perl script, you mean. i have another question which i will submit in new thread. From: Shlomi Fish To: Rajeev Prasad Cc: perl list Sent: Friday, June 28, 2013 11:45 AM Subject: Re: printing content of a

setting expect buffer size when reading/writing to PIPE

2013-06-28 Thread Rajeev Prasad
how to set length of read buffer when expect object is a PIPE. my ($pty, $pid) = $ssh->open2pty($command); my $exp = Expect->init($pty); _now how can i set the buffer size on this object? when i print following from script, both of the following values are 0 $exp->match_max() $exp->max_accum()

errors building CRYPT:: DES on 64 bit perl usimng Solaris studio 12.3 Solaris 10

2013-06-28 Thread Dariusz Dolecki
rl10/5.18.0/lib/5.18.0/sun4-solaris-64/CORE" des.c "des.h", line 1: cannot find include file: "des.h", line 3: warning: no explicit type given "des.h", line 3: syntax error before or at: des_user_key "des.h", line 3: warning: old-style declaration or incorrect type for: des_user_key "des.h", lin