[Courses] [Perl] Part 9: Simple File Access

Dan Richter daniel.richter at wimba.com
Tue Sep 16 11:09:12 EST 2003


Oops: there's an error.

>b) Here is a very basic program that replaces "ize" with "ise":
>
>   #!/usr/bin/perl -w
>   use strict;
>
>   while ( defined(my $line = <STDIN>) ) {
>     $line =~ s/ize\b/ise$1/g;
>     print $line;
>   }

The "$1" in this program is an error; it should simply be removed.

-- 
     He doesn't have ulcers, but he's a carrier.
                - Anonymous



More information about the Courses mailing list