Re: Problems with regex only matching first match on a line.

2002-03-06 Thread Luke Bakken
s/$pattern/$replace/g On Tue, 5 Mar 2002, Tor Hildrum wrote: #!/usr/bin/perl -w use strict; use warnings; print What file do you want to open?\n; chomp(my $openfile = STDIN); print What file do you want to write to?\n; chomp(my $outfile = STDIN); print What do you want to replace in

Problems with regex only matching first match on a line.

2002-03-05 Thread Tor Hildrum
#!/usr/bin/perl -w use strict; use warnings; print What file do you want to open?\n; chomp(my $openfile = STDIN); print What file do you want to write to?\n; chomp(my $outfile = STDIN); print What do you want to replace in the first file?\n; chomp(my $pattern = STDIN); print What do you want to

Re: Problems with regex only matching first match on a line.

2002-03-05 Thread Jon Molin
Tor Hildrum wrote: #!/usr/bin/perl -w use strict; use warnings; print What file do you want to open?\n; chomp(my $openfile = STDIN); print What file do you want to write to?\n; chomp(my $outfile = STDIN); print What do you want to replace in the first file?\n; chomp(my $pattern =

Re: Problems with regex only matching first match on a line.

2002-03-05 Thread John W. Krahn
Tor Hildrum wrote: #!/usr/bin/perl -w use strict; use warnings; print What file do you want to open?\n; chomp(my $openfile = STDIN); print What file do you want to write to?\n; chomp(my $outfile = STDIN); print What do you want to replace in the first file?\n; chomp(my $pattern =