On Thu, Nov 20, 2014 at 05:22:20PM +0100, Tom de Vries wrote:
> +my $conf = "$ENV{HOME}/.mklog";
> +if (-f "$conf") {
> +    open (CONF, "$conf")
> +     or die "Could not open file '$conf' for reading: $!\n";
> +    while (<CONF>) {
> +     if (m/^\s*NAME\s*=\s*(.*)\s*$/) {

The final \s* never matches anything since the .* gobbles up everything.
Use .*? if you really want to get rid of the trailing whitespace.


Segher

Reply via email to