I am completely new to perl programming. My father is helping me learn said programming language. However, I am stuck on one of the assignments he has given me, and I can't find very much help with it via google, either because I have a tiny attention span, or because I can be very very dense.
My problem is this:
I am attempting regular expression matching and replacement on a file that has a hidden character in the word I am trying to replace.
The character is ^A. It is in the word co^Amputer . It shows up multiple times, and all times has ^A in it.
My code is:
#!/usr/bin/perl
use strict;
my $rules ="/Users/caitlin/scripts/challenge.txt";
open my $FH,'<', $rules or die $!;
while (my $line = <$FH>){
$line =~ "s/computer/WINNER/g";
print $line;
}
According to my father, who is not available right now, I should be able to match and replace with method of matching that I am already familiar with, but it evades me.
And I did searches to try and find ways to match it, but I received answers that did not seem to apply to the issue I am currently experiencing.
I would really appreciate some help :wall:
Thank you very much!