Simple Perl command line filter

How to write a simple Perl command line filter?

Say I want to filter on the lines with 2, and change it to changed, then output. How to do that?

My mind must be blocked -- why is the following not working?

$ seq 3 | perl -e 'if (/2/) { s/2/changed/; print }'

$ seq 3 | perl -e 'if (/2/) { s/2/changed/; print }' | wc -l 
0