I don't want to get into that example in too much detail as it serves no proper purpose. However, I do have issues with it, for example the local $/ doesn't assign anything so doesn't do anything. Meanwhile I have been thinking what would a proper solution be and I keep getting back to the fact that this is not the best way write a config file. Better would be to have
{ folder => 'path',
in the following hash, instead of my $folder = 'path';
In any case, unless the config file is used to load all configuration data rather than pick just one item, then it is being misused as well as ill-conceived. There are two types of config file. The language portable one that is just a list of identifiers followed by their values and the "normal" perl way: a class-qualified symbol and a hash assigned to it, which is intended to be loaded in easily enough using just one "require" statement.
Unfortunately, the OP seems to be suffering from an organisation culture that stubbornly resists change even to fix bad implementations. In the wider Perl community we know who they are by reputation and simply avoid working there!
| [reply] [d/l] [select] |
| [reply] [d/l] [select] |
thanks for that browser. I would still advocate assigning undef to it explicitly though for clarity.
local $/ = undef; $slurp = <fh>;
is in fact the example given in perlsub and I feel with good reason.
| [reply] [d/l] |
Thanks for the improvements.
Problem is that i am not allowed to touch config.file.I use this kind of config.file in order to improve my Perl approach.
unless the config file is used to load all configuration data rather than pick just one item
Yes, it is the case in part
In the wider Perl community we know who they are by reputation and simply avoid working there!
Hope i will be one of this wider community !
Thanks
*****Lost in translation****TIMTOWTOI****
| [reply] [d/l] [select] |
| [reply] |