Today I ran into this error: Base class package “Tree::DAG_Node” is empty. (Perhaps you need to ‘use’ the module which defines that package first.) at /usr/lib/perl5/vendor_perl/5.8.8/XML/Validator/Schema/Node.pm line 2 An odd error from perl’s XML Validation libraries; here is how you fix it: install the Tree::DAG_Node package yum -y install perl-DAG_Node
Archive for the ‘Perl’ Category
Here is how to do a search and replace using Perl regex over a set of files: perl -pi -e ‘s/source/destination/g’ *.ext
If you ever have to set an environment variable you may run into the same reality I ran into. A simple call to system using export (as you might do on the command line)… system( "export MYVAR=somevalue" ); …does not work! You have to use the Perl ENV hash variable: $ENV{’MYVAR’} = "somevalue"; Changes to [...]
Categories: Perl