Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

CPAN::INDEX problem

by Raymond (Novice)
on Jun 11, 2013 at 21:20 UTC ( #1038343=perlquestion: print w/replies, xml ) Need Help??
Raymond has asked for the wisdom of the Perl Monks concerning the following question:

I use win7, with strawberry and Dwin, but my system ask for, CPAN::Index version 1.93 required--this is only version 0.01. I have downloded CPAN::Index 2.0, but I don't know to install it, or make it run, can someone give me a hand?
The second question is about this small program
use strict;
use warnings;
#programa 1
print "hello, world.\n"
#programa 2
print "Gimme a number: ";
chomp($n = <STDIN>); #$n now holds "0.00000";

print "The value $n is", $n ? "TRUE" : "False", "\n";
My small system ask for a package but I don't know wich, one tip pls. Best Regards Raymond

Replies are listed 'Best First'.
Re: CPAN::INDEX problem
by syphilis (Chancellor) on Jun 11, 2013 at 22:43 UTC
    CPAN::Index version 1.93 required--this is only version 0.01

    I think you'll find that you have 2 versions of CPAN::Index.
    Version 0.01 will be in perl/site/lib/CPAN/, and a version that is later than 1.93 in perl/lib/CPAN/
    Remove the file perl/site/lib/CPAN/ (ie version 0.01) and that particular problem should be fixed.

    But make sure you don't remove perl/lib/CPAN/

Re: CPAN::INDEX problem
by ww (Archbishop) on Jun 11, 2013 at 22:24 UTC
    I don't understand your question about your "small program," but I can tell you that as posted, it won't compile NOR "ask for a package NOR anything else expect tell you that $n "requires explicit package name." That means you didn't declare it with my or our or anything else that would satisfy strict.

    On the possibility that the program is intended to look something like this:

    #!//usr/bin/perl use strict; use warnings; # 1038343 #programa 1 print "hello, world.\n"; #programa 2 print "Gimme a number: "; # 0.0000; my $n = 0.00000; chomp($n = <STDIN>); #$n now holds whatever the input is +at STDIN print "The value $n is", $n ? "TRUE" : "False", "\n";

    Note the semi-colons... and the revised comment about the value of $n: Yours would be accurate only if the input were 0.00000...
    Otherwise the script behaves as expected.

    One other possibility occurs -- that that line containing 0.00000 is intended to reflect user input. If so, refer to the above about missing semicolons and declarations.

    For a clear explanation of your final line of code, using the ternary operator, please see for its syntax and use.

    Also, please read and heed the instructions around the text-input box -- where you typed this node. Use <c>...</c> tags around your code... and per Markup in the Monastery (which you should also read), please don't use <pre>...</pre> tags.

    If you didn't program your executable by toggling in binary, it wasn't really programming!

Re: CPAN::INDEX problem
by DrHyde (Prior) on Jun 12, 2013 at 10:43 UTC
    Don't download it by hand. Download and install it with cpan CPAN::Index.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1038343]
Approved by hdb
[holli]: but then you DO give a fuck
[1nickt]: I don;t think beliefs should be down-voted, just behaviours.
[james28909]: im not quite how to explain it any better nick. you evolved from ignorance to intelligence. not the other way. the universe evolves from gas coulds and debris into planets stars and galaxies ect. it doesnt happen any other way. hence it has ....
[james28909]: some kind of logic behind it
[james28909]: and that is also anothe rpoint i made, i think it has to do with perception of the world around you. most people think of evolution on a human scale. why could life evolve on this planet? because this planet evolved in this solar system. and so on.
[holli]: here's something for you to watch, James. I think you will like it
[erix]: for the record: I have not downvoted anyone on that subthread that was my fault
[james28909]: there are all kinds of things that had to happen to let life come to be. but at the same time, life may not be the end goal IF there is any kind of end goal lol
[james28909]: well who is the person who gets to decide which behaviour is worthy of a downvote? a person with their own beliefs? xD
[erix]: teleology -- I've never understood why that was thunk up

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (18)
As of 2017-12-15 14:33 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (433 votes). Check out past polls.