http://www.perlmonks.org?node_id=988967

ulaksh has asked for the wisdom of the Perl Monks concerning the following question:

open FILE,"config.txt" or die "cannot open file : $!"; while(<FILE>) { $ip = ($_ =~ m/(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/ ) print "$ip"; # print $_; }
output I got is
syntax error at startandendmatch.pl line 7, near ") print" Execution of startandendmatch.pl aborted due to compilation errors.