require always returns a true value when it succeeds. (You know how Perl modules have to end in a true value? It returns that; though repeated use of require to load the same module just returns 1.) So the "1" in your code is completely unnecessary.
eval { require Data::Dump } or require Data::Dumper;
In reply to Re^2: load a module or another: Dumper or dd
by tobyink
in thread load a module or another: Dumper or dd
by Discipulus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |