stevieb has already given a solution, but no-one has so far explained why your original code doesn't work. Why I think it doesn't work is this: the s///g expression returns false if it hasn't found any matches in the line, so then because of the && operator the print won't be ran. You could write this instead if you want all lines to be printed, even those where nothing is replaced:
perl -lne 's/<.*>/<new text>/g; print'
In reply to Re: Find/Chng every <any>
by ambrus
in thread Find/Chng every <any>
by Saved
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |