Re: Regarding strings

2005-01-10 Thread Ing. Branislav Gerzo
[EMAIL PROTECTED] [am], on Friday, January 7, 2005 at 23:17 (+0530) wrote: am> Found solution. am> am> $len = length($temp); am> if ($len > 2) am> { am> $temp=substr($temp,$len-2,2); am> } am> hm, what about: $temp = $1 if $temp /(\d\d)$/

Re: Regarding strings

2005-01-07 Thread John W. Krahn
[EMAIL PROTECTED] wrote: Hi Frnds, Hello, If I have a number of 6 digits. How to get the last 2 digits. This should be valid even when i have 2 digits as input. i.e If input is 991041 then output shud be 41 if input is 41 then output shud be 41 May be junk and simple question but ..i need thi

RE: Regarding strings

2005-01-07 Thread arjun.mallik
ary 07, 2005 11:02 PM To: beginners@perl.org Subject: Re: Regarding strings perldoc -f substr alfred, [EMAIL PROTECTED] wrote: >Hi Frnds, >If I have a number of 6 digits. How to get the last 2 digits. This >should be valid even when i have 2 digits as input. i.e If input is >991041 t

Re: Regarding strings

2005-01-07 Thread Alfred Vahau
perldoc -f substr alfred, [EMAIL PROTECTED] wrote: Hi Frnds, If I have a number of 6 digits. How to get the last 2 digits. This should be valid even when i have 2 digits as input. i.e If input is 991041 then output shud be 41 if input is 41 then output shud be 41 May be junk and simple questio

Regarding strings

2005-01-07 Thread arjun.mallik
Hi Frnds, If I have a number of 6 digits. How to get the last 2 digits. This should be valid even when i have 2 digits as input. i.e If input is 991041 then output shud be 41 if input is 41 then output shud be 41 May be junk and simple question but ..i need this ..please do respond.. Than