in reply to Re: perl string extract
in thread perl string extract

Your regex:

if ($line =~ /logfile\s*\=\s*(.+?)\s*\,/){
unilaterally matches a comma and so does not seem to match the OP's requirement to match with or without a comma.