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


in reply to Re: Config::Std multi-part problem
in thread Config::Std multi-part problem

Thanks, this works fine.

I now also use Contextual::Return to see if the value is a scalar in the first place:

print "This is a scalar\n" if (SCALAR { $config{"MYSECTION"}{"element"} });

If I had the time, I could look into Contextual::Return to see what code is SCALAR, and extract only that, but I see no problem so far in including the whole module.

I've noticed a blank entry in %config. Please see the new thread I created for that subject.