RE: Handling ignore case and single line in pattern matchin

2008-07-13 Thread V.Ramkumar
Hi, If you don't define input line separator $/=undef; Perl reads line by line only. The below code is to match ignore case in regex. $inputline=~m/[a-z]+/i; Here i is used for ignore a case. It will match any group of character may be lower or upper or mixed case. Regards, Ramkumar Software -

RE: A newbie question - line number inside the script

2008-07-16 Thread V.Ramkumar
Just use $. To print current line number. Regards, Ramkumar -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Character entity 2 Hexadecimal Entity - Better Idea

2008-07-24 Thread V.Ramkumar
Hi List, I am having INI file which contains, list of both character entity and corresponding hexadecimal entity. Based on this file, I am replacing one entity to another using normal Perl replacement. Instead of this method, any one know better idea or any method in Perl to do this, Please sugge

Replacement using variable

2008-07-25 Thread V.Ramkumar
Hi, Any one suggest me, what is the error in my below code, Not any error when run, But unable to get the search value in replacement. $content=~s/<$allelm/"<\1 xml:id=".$idseq++/egsi; Here $allelm contains element list, (para|quote|list). I am getting output as a junk for \1. Regards, Ramkum

RE: open program

2008-09-08 Thread V.Ramkumar
>>I am trying to open Internet explorer from within Perl.I have used the >>following code: You cau use like this: system ("start iexplore \"www.google.com\""); System ("start iexplore"); Regards, Ramkumar -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addit

Round a digit in perl

2008-09-12 Thread V.Ramkumar
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

RE: Round a digit in perl

2008-09-12 Thread V.Ramkumar
>>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

Non standard entity conversion

2008-09-26 Thread V.Ramkumar
Hi List, I am doing entity conversion decimal entity (input xml) 2 named entity(output xml) in perl using HTML::Entities::Numbered. But it's not returning named entity for some decimal entities. If any body have idea to avoid the below issue, please share with me. Ex: Coding. use HTML::Entities::

RE: Non standard entity conversion

2008-09-29 Thread V.Ramkumar
Hi List, I am doing entity conversion decimal entity (input xml) 2 named entity(output xml) in perl using HTML::Entities::Numbered. But it's not returning named entity for some decimal entities. If any body have idea to avoid the below issue, please share with me. Ex: Coding. use HTML::Entities:

RE: reference question

2008-09-30 Thread V.Ramkumar
Hi List, How to find out the existence of duplicate values in perl array. Regards, Ramkumar -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/