in reply to sed in perl

you're already doing that! the backticks (``) capture the output of sed, and place it into $haha. (You're missing a dollar sign at the front of the line.) print($haha) and you'll see the fixed up text :)

$haha = 'I have black tyres.'; $haha=`echo $haha | sed "s/tyre/tire/g"`; print($haha, "\n"); # outputs: I have black tires.

However, there's no need to use sed in this fashion. perl is quite good at doing text manipulations, including regular expressions:

$haha = 'I have black tyres.'; $haha =~ s/tyre/tire/g; print($haha, "\n"); # outputs: I have black tires.