insert text

Reply

Join Date: Sep 2008
Posts: 5
Reputation: viktorijakup is an unknown quantity at this point 
Solved Threads: 0
viktorijakup viktorijakup is offline Offline
Newbie Poster

insert text

 
0
  #1
Feb 9th, 2009
Hi !

This sctipt work with \insert{aaa.tex} but dont work with \insert aaa.tex


What I must do ?!

while(/^\\insert\{(.*?)(\.tex)?\}/){
      $pries=$`."\n";
      $nekeisk=$&;
      $vardas=$1;
      $po=$';
      $failiukas=$1.".tex";
         
      if(-e "$dir/$failiukas"){
                               open (IN2,"<$failiukas") || die "negaliu atidaryti $failiukas failo.\n";
                               $vidus=<IN2>;
                               close IN2;
     
                               $visas=$visas.$pries.$vidus."\n";
                               $_=$po;
                               print "Idetas failas $failiukas\n";
                              }
     else{
           $visas=$visas.$pries.$failiukas."\n";
           $_=$po;
           print "$failiukas failas nerastas!!!!!!\n";
         }
                               }
$visas=$visas.$_;
$_=$visas;
$visas = "";
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 898
Reputation: KevinADC has a spectacular aura about KevinADC has a spectacular aura about 
Solved Threads: 67
KevinADC's Avatar
KevinADC KevinADC is offline Offline
Practically a Posting Shark

Re: insert text

 
0
  #2
Feb 9th, 2009
try:

while(/^\\insert{?(.*?)(\.tex)?}?/){

you don't need to escpae the {} brackets with \
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC