emp1953 has asked for the wisdom of the Perl Monks concerning the following question:
I am running Fedora 19, checking the Perl version says I have version 5.16 What is wrong with my Perl installation? I have copied several simple scripts from various web sites. All fail to run, on line 4 where it says "use xxxx::class" etc error follows:
Can't locate Path/Class.pm in @INC (@INC contains: /usr/local/lib64/pe +rl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/pe +rl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ./perl_exampl +e.pl line 4. BEGIN failed--compilation aborted at ./perl_example.pl line 4.
THIS IS ONE OF THE SCRIPTS
#!/usr/bin/perl use strict; use warnings; use Path::Class; my $dir = dir('foo','bar'); # foo/bar # Iterate over the content of foo/bar while (my $file = $dir->next) { # See if it is a directory and skip next if $file->is_dir(); # Print out the file name and path print $file->stringify . "\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: My Perl installation does not work
by Athanasius (Archbishop) on Jan 17, 2017 at 04:22 UTC | |
|
Re: My Perl installation does not work
by kevbot (Vicar) on Jan 17, 2017 at 04:34 UTC | |
|
Re: My Perl installation does not work
by morgon (Priest) on Jan 18, 2017 at 03:15 UTC |