in reply to using the Modules

Remove the use lib line you could try the following options:
1) export PERL5LIB="/home/hamidjon/Perl/Learning/code_examples/myModules"
2) perl -I/home/hamidjon/Perl/Learning/code_examples/myModules yourScript.pl
3) perl -V will show you a list of system direcotries where perl will look for modules. Once you module is ready you might want to put them there

Replies are listed 'Best First'.
Re^2: using the Modules
by frozenwithjoy (Priest) on Jul 15, 2012 at 16:36 UTC
    Just to clarify for programmer.perl, in case it isn't clear to him/her: these need to be done at the command line, not inside the script.

      Yes, I didn't know that this line must be written in command line. Instead, I was writting any similar line to my program. Also, now I made it clear for myself the factors like "compile time" and a "run time"...

      Thanks, now I configured my module directories, afterall, I'll write at top line of my programs (that uses modules) just this line: 'use Module_name;':

      (at command line) export PERL5LIB="/home/hamidjon/Perl/Learning/code_examples/myModules"
      ...and I check using 'perl -V':
      Built under linux Compiled at Mar 23 2012 17:00:13 %ENV: PERL5LIB="/home/hamidjon/Perl/Learning/code_examples/myModules" @INC: /home/hamidjon/Perl/Learning/code_examples/myModules /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl

      I entered this line in a file called 'profile' (/etc/profile) and I can access modules any time without entering each time the line (export PERL5LIB="/home/hamidjon/Perl/Learning/code_examples/myModules"; export PERL5LIB) after the reopening the command line.