in reply to Re^2: Recover a path from a config file
in thread Recover a path from a config file
If you cannot modify the config file, then none of the suggestions here will help. Perhaps you could use eval instead of do?
use strict; use warnings; use Data::Dumper; my ($content); { open my $fh,'<','work.conf' or die $!; local $/; $content = <$fh>; } my $config = eval $content; print Dumper(\$config);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Recover a path from a config file
by Chaoui05 (Scribe) on Jun 06, 2016 at 13:31 UTC | |
by GotToBTru (Prior) on Jun 06, 2016 at 18:46 UTC | |
by Chaoui05 (Scribe) on Jun 07, 2016 at 08:45 UTC |