echo "match"|perl -lne 'print if(substr("515",1) eq substr("415",1))' echo "no match"|perl -lne 'print if(substr("515",1) eq substr("416",1))'
Standard input is empty
match
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!