in reply to A Question on Regex

Have you tried re? Try this: It'll show you where you went wrong.
#!/usr/local/bin/perl use strict; use warnings; use re qw(debug); open IN, '<', '/root/Desktop/new file'; while(<IN>) { if($_ =~ /\$display(.*?);$/i) { print $_; } } close IN;