#!/usr/bin/perl -w

use strict;
use warnings;

while (<>) {                        # take one input line at a time 
  chomp; 
  if (/YOUR_PATTERN_GOES_HERE/) {   # change it as you wish!
    print "Matched: |$`<$&>$'|\n";  # the special match vars: $` , $& ,and $'
  } else { 
    print "No match: |$_|\n";       # no match
  } 
} 

