How do i perform multiple line substitution into single line for same variable using perl

I have used the following substitutions in the file for same variable three different times.i like to make it in single line.how can i do it.Note that the variable should perform all substitutions to the file.

$line=~ s/\&//g;
$line=~ s/[\\\_\@\_]//g;
$line=~s/COMMENT//g;

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.