Re: Can't locate feature.pm in @INC



You are trying to use a feature that is in perl-5.10 and not in your
installed version of perl 5.8.8.

If you want switch functionality then you might want to install the
Switch cpan module from which you will be able to

use Switch;

switch ($val) {
case 1 { print "number 1" }
case "a" { print "string a" }
}

or upgrade to perl-5.10

--tomasz

On Wed, May 28, 2008 at 10:59 PM, William <esia168@xxxxxxxxx> wrote:
Hello, at http://search.cpan.org/~rgarcia/perl-5.10.0/pod/perlsyn.pod#Switch_statements they say
Starting from Perl 5.10, you can say
use feature "switch";

But when I am using "This is perl, v5.8.8 built for i486-linux-gnu-thread-multi"

I still got error of

william@william-pc:~$ perl
use feature "switch";
Can't locate feature.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at - line 1.
BEGIN failed--compilation aborted at - line 1.


How can I solve this ? Thanks


Send instant messages to your online friends http://uk.messenger.yahoo.com

--
To unsubscribe, e-mail: beginners-unsubscribe@xxxxxxxx
For additional commands, e-mail: beginners-help@xxxxxxxx
http://learn.perl.org/



.



Relevant Pages

  • Re: cannot locate feature.pm error
    ... here is the message got after trying "install feature.pm" on terminal command ... In Perl, you make use of modules with statements of the type: ... install feature ...
    (perl.beginners)
  • Re: Print question
    ... following from the original post: ... "feature, not a bug" a long time ago when I programmed ... C, C++, and Perl don't suffer from this ... switch), which made me think that maybe the original ...
    (comp.lang.perl.misc)
  • Can I not use the -E switch in the perl debugger/interpreter?
    ... Now that I'm using Perl 5.10, I will often replace the "-we" switch ... advantage of the "say" feature, which allows me to omit typing the ... just like it did in the above one-liner. ...
    (comp.lang.perl.misc)
  • MS Project 2003
    ... When ever I switch my application to MS Project 2003. ... I do not want to install speech recognition. ... "Microsoft Project can't load Speech Recognition files. ... This feature is currently installed. ...
    (microsoft.public.project)
  • Re: Cant locate feature.pm in @INC
    ... You are trying to use a feature that is in perl-5.10 and not in your ... installed version of perl 5.8.8. ... If you want switch functionality then you might want to install the ...
    (perl.beginners)