On 03 Sep 2012, at 09:56 , Kendall Conrad <[email protected]> wrote:

[Yes, I know this is old]

> #!/usr/bin/perl
> my $str = '\bthe\b';

my $str = '##';

> my $iter = 0;
> while (<>) {
>       if ($_ =~ m/${str}/){
>               my $n1 = $_;
>               while ($n1 =~ m/(${str})/) {
>                       $iter++;
>                       $n1 =~ s/(${str})/$1${iter}/;
>               }
>               print $n1;
>       }
>       else {
>               print "$_";
>       }
> }
> 

I made a slight change to this script because I wanted to replace the following:

## "Space Pilot 3000"   In color
## "The Series Has Landed"      In Hypno-Vision
## "I, Roommate"        As seen on TV[1]
## "Love's Labours Lost in Space"       Presented in BC [Brain Control] Where 
Available
## "Fear of a Bot Planet"       Featuring gratuitous alien nudity
## "A Fishful of Dollars"       Loading...
## "My Three Suns"      Presented in double vision (where drunk)
## "A Big Piece of Garbage"     Mr. Bender's Wardrobe By Robotany 500
## "Hell Is Other Robots"       Condemned by the Space Pope[1]
## "A Flight to Remember"       Filmed On Location
## "Mars University"    Transmitido en Martian en SAP
## "When Aliens Attack" Proudly Made on Earth
## "Fry and the Slurm Factory"  Live from Omicron Persei 8

With sequential numbers. I put it into a text factory, selected the block of 
text, and… all I get is a "BBEdit Progress window" forever. When I click 
"Stop", this doesn't stop BBEdit. I end up having to force-quit BBEdit.

% /usr/bin/perl --version

This is perl 5, version 12, subversion 4 (v5.12.4) built for 
darwin-thread-multi-2level
(with 2 registered patches, see perl -V for more detail)



-- 
I loved you when our love was blessed I love you now there's nothing
left But sorrow and a sense of overtime

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].


Reply via email to