Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with CPAN - begginer 1

Status
Not open for further replies.

kcire

Programmer
May 15, 2009
18
BR
hello

im begginer in perl

i have strawberry perl installed im my machine, and im having problems with setting perl commands on CPAN Client, no perl commands is accepted

one example is:

!/usr/bin/perl

error:

"Bareword found where operator expected at <eval 20> line 1
 
The first line of a perl script should be:

#!usr/bin/perl

besides that I don't know what you are asking



------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
i already typed

#!usr/bin/perl

it shows strict subs error at usr, bin and perl



 
I guess perl doesn't like you.

But really..... how do you expect anyone to know why you are getting that error without some more information? Post your code and describe how you are trying to run it.

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
If you're already running the cpan shell, enter the command "help" (without the quotes) and you'll get a list of all the cpan commands.

If you're trying to run cpan, at your shell type "perl -MCPAN -e shell" (again, without the quotes) and the CPAN shell should start. If you haven't used it before, you'll need to answer a few questions to configure the CPAN module. Most the defaults should work for you.
 
Kevin

the problem is that i cant send a code because none of perl code is accepted in my perl CPAN Client

im following a book "PERL - Complete Guide" from O´Reilly publisher by ellen siever, stephen spainhour & Nathan Patwardhanand, and those codes shown in is not applying im my case,

its very likely that im typing something wrong, but i followed step by step from the very begging

and rharsh

i asked for help on the cpan shell, but i really haven´t found answer to this problem

its strange that none of perl code is accepted on CPAN

THANKS FOR THE PATIENCE

if someone has any idea about this problem, plz tell me,

im about to get bald because of it, hahaha and i didnt start on programming life yet

 
Maybe someone else can help you. I give up.

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
The CPAN module (of which the CPAN shell is a part of) is typically used to download modules that others have written, you don't use 'perl code' in the CPAN shell. Are you trying to download modules?

I might suggest rereading your book from the beginning and follow the examples that (I assume) they give. If you are just starting out, you shouldn't really need to get into anything on CPAN for some time.
 
some *** is being made by me, by fact, but

i started for about a few days

i installed the strawberry perl win32 for XP, and then there´s a CPAN Client on it, followed the book, it seems to give the feeling that the perl code was on CPAN(even i noticed that CPAN uses to download/create/get/test modules)

so,

where the perl codes is written?

thanks for patience once again

 
Ah. I think I've got it. When you write a perl program, you use an editor. Like maybe notepad.exe, or hopefully something better.

Create your program, and save it. We'll call it hello.pl, for example. Then when you want to run it, go to the command prompt, and type perl hello.pl.

Don't use the CPAN shell, until you need to download and install a module you don't have.

Good luck...

Steve

[small]"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object::perlDesignPatterns)[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top