I'm having trouble writing a script that will remove the regular 
expression "<B>" in a text file in macperl.  At first I thought I was 
making a programming mistake but I tried the same script in Linux and it 
worked as expected; in macperl the <B> will be removed but every line 
after the first will be deleted in the output file.  I've included the 
code as well as the droplet and a sample input file "funerals" in this 
email.

#!/usr/bin/perl -w
{
    foreach $inFile (@ARGV) {
        open (INNEWSFILE, $inFile);
        open (OUTTEXTFILE,">".$inFile.".txt");

        $newsFile = <INNEWSFILE>;
        $newsFile =~ s/<B>//g;
        print OUTTEXTFILE $newsFile;
       
        close (INNEWSFILE);
    }
}

application/applefile

newseditfix.pl

funerals

Reply via email to