in reply to String manipulation in a document
in thread Grep a particular text

What have you tried? What documentation have you read?

Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond

Replies are listed 'Best First'.
Re^2: String manipulation in a document
by ponni (Novice) on Jul 10, 2019 at 06:03 UTC

    Dear sir, i am new to perl, and i need to cleanup my .tex file.

      That is implied, but what are you expecting from us? We are happy to help with coding issues, but we are not usually a code writing service. If you show that you have made some effort we can help you go the next step. If you make no effort then probably neither will we.

      Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond

        Dear All, i have created the below script working fine to extract the query text and store in a variable. After that, i need to place the values after two carriage returns. I don't know how to place the query values after two carriage return.

        Kindly suggest friends!

        use strict; use warnings; my $InputXmlFile = $ARGV[0]; my $OutputXmlFile = $InputXmlFile; my $OutProcesText = ""; $OutputXmlFile =~ s#\.tex$#\.tex#gsi; my $workingpath = $1 if $InputXmlFile =~ m/(.*)\\(.+)\.tex/i; my $filename = $2 if $InputXmlFile =~ m/(.*)\\(.+)\.tex/i; open (INTXT, "$InputXmlFile") ||die ("Can't open the input file $I +nputXmlFile"); my $inText = join("",<INTXT>); close (INTXT); while($inText =~ m#\\section\{(.*?)\}\n\n#gi) { my $qrtext = $1; if ($qrtext =~m/\\qr\{(.*?)\}/) { my $qrFindText = $1; print $qrFindText; } }