my $string; $string="PERL is an Acronym of practical extraction and report language\ni like it very much"; # here "." is as usual i.e any single character.(including \n) so it matches and returns 1. print $string =~ /language.i/s; # here "." matches any character other than \n, but in our string language followed by \n is there. so it doesnt return 1. its false. print $string =~ /language.i/m; # here \n followed by i will match so returns true. print $string =~ /language\ni/m; # As simple s modifier consider . as a single character. that could be anything... returns true... print $string =~ /language\ni/s;