Re: help in regular expression

2011-09-10 Thread Uri Guttman
> "ta" == timothy adigun <2teezp...@gmail.com> writes: ta> You can use unpack: ta>$val = "11.0.56.1"; ta>$new_val=unpack("x5 A2",$val); # skip forward 6, get 2 ta> print $new_val # print 56; unpack would be a poor choice if the number of digits in a field changes. pac

Re: how good is Net::OpenSSH::Parallel in your experience

2011-09-10 Thread Shlomi Fish
On Sun, 11 Sep 2011 02:32:58 +0200 Paul Johnson wrote: > On Sat, Sep 10, 2011 at 04:35:07PM -0700, Rajeev Prasad wrote: > > > Hi > > > > i am planning to use this module, but its version is 0.11 ! and author says > > it is beta quality. i am using Net::OpenSSH which is also below ver 1.0 > >

Re: help in regular expression

2011-09-10 Thread timothy adigun
Hi Irfan, You can use unpack: $val = "11.0.56.1"; $new_val=unpack("x5 A2",$val); # skip forward 6, get 2 print $new_val # print 56;

Re: how good is Net::OpenSSH::Parallel in your experience

2011-09-10 Thread Paul Johnson
On Sat, Sep 10, 2011 at 04:35:07PM -0700, Rajeev Prasad wrote: > Hi > > i am planning to use this module, but its version is 0.11 ! and author says > it is beta quality. i am using Net::OpenSSH which is also below ver 1.0 but > i have had no issues with it so far. > > does anyone have any goo

how good is Net::OpenSSH::Parallel in your experience

2011-09-10 Thread Rajeev Prasad
Hi i am planning to use this module, but its version is 0.11 ! and author says it is beta quality. i am using Net::OpenSSH which is also below ver 1.0 but i have had no issues with it so far. does anyone have any good/bad experience with this module? thank you. Rajeev

Re: help in regular expression

2011-09-10 Thread Rob Dixon
On 10/09/2011 18:23, Irfan Sayed wrote: hi, i have following string. $val = "11.0.56.1"; i need to write regular expression which should match only "56" and print please suggest I think you should forget about regular expressions and use split: my $sub = (split /\./, $val)[2]; HTH,

Re: help in regular expression

2011-09-10 Thread Shawn H Corey
On 11-09-10 01:23 PM, Irfan Sayed wrote: i have following string. $val = "11.0.56.1"; i need to write regular expression which should match only "56" and print please suggest ( $val =~ /(56)/ ) && print $1; -- Just my 0.0002 million dollars worth, Shawn Confusion is the first st

Re: help in regular expression

2011-09-10 Thread Shlomi Fish
Hi Irfan, On Sat, 10 Sep 2011 10:23:31 -0700 (PDT) Irfan Sayed wrote: > hi, > > i have following string. > > $val = "11.0.56.1"; > > i need to write regular expression which should match only "56" and print > There are any number of ways to extract "56" using a regular expression from

help in regular expression

2011-09-10 Thread Irfan Sayed
hi, i have following string. $val = "11.0.56.1"; i need to write regular expression which should match only "56" and print please suggest  regards irfan