How to remove line break in perl?

$line =~s/\n//g;

s - search and replace
\n - line break
g- replace all the occurrence of \n