>>Hope this helps:
>>#!/usr/bin/perl -w
>>$| = 1;
>>use strict;
>>sub correct_range {
>> my @args = @_; # nasty side effects if you map @_!
>> my( $from, $to ) = map { $_ = reverse $_ } @args;
>> substr( $from, 0, length $to ) = $to;
>> return reverse( $from );
>>}
>>while( my $line = ){
>>my
Hi,
V.Ramkumar <[EMAIL PROTECTED]> asked:
> My input xml file has,
> 246–52
>
> I have to replace,
> 246–252
>
> Similarly,
>
> 100-5 100-105
> 198-10198-210.
>
> If anybody have logic for the above, please suggest.
Hope this helps:
#!/usr/bin/perl -w
$| = 1;
use strict;
Hi Ramkumar,
Ummm, as a suggestion, why don't you explain to us (in words) what you
want to do and try some sample code and we can give you some
feedback/corrections?
Your question about whether anyone has any "logic for the above" sounds
like you can't put the problem into words? That see
> -Original Message-
> From: V.Ramkumar [mailto:[EMAIL PROTECTED]
> Sent: 12 September 2008 11:33
> To: beginners@perl.org
> Subject: Round a digit in perl
>
> Hi List,
>
> My input xml file has,
> 246–52
>
> I have to replace,
> 246–252
Hi List,
My input xml file has,
246–52
I have to replace,
246–252
Similarly,
100-5 100-105
198-10 198-210.
If anybody have logic for the above, please suggest.
Regards,
Ramkumar
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http