Re: how to use perl modules



Abhishek Dave wrote:
> hello all,
> i've wrote a small test subroutine in my file name test.pm and in the same directory i worte
> a perl file in which i've to call this subroutine in this perl program
>

Capitals, punctuation, and full words are a good idea when posting to a
public forum. Poor grammar from non-native speakers is certainly
tolerated, but if you can write what you wrote above then you know
enough to punctuate and capitalize. And very few <language> -> English
dictionaries would produce such output.

> I dont know how to use perl modules
> pls let me knwo abt that as it will solve my lots of problems
>
> test.pm
>
> sub ReturnValue()
> {
> my $a=10;
> return ($a);
> }
>
> call.pl
>
> use test;
> print ReturnValue();
>
>
> --I don't know abt the moduls in perl
>

Did you run the program? What did it say and what does that tell you?

> Pls help me in this regard asap
>

What have you researched, what have you read on the topic? Have you
searched google on "How to write Perl modules"?

perldoc perlmod
perldoc perlmodlib
perldoc perlmodstyle

> waiting for reply from perl group
>

http://danconia.org

> Thanks
> Beginner
.



Relevant Pages

  • how to use perl modules
    ... i've wrote a small test subroutine in my file name test.pm and in the same directory i worte ... a perl file in which i've to call this subroutine in this perl program ... sub ReturnValue() ...
    (perl.beginners)
  • Re: how to use perl modules
    ... > this perl program ... > pls let me knwo abt that as it will solve my lots of ... > sub ReturnValue() ...
    (perl.beginners)
  • Re: Executing perl scripts with a perl script
    ... I have no real working knowledge of perl. ... These scripts are really not module worthy. ... Makes reusablity a pain. ...
    (perl.beginners)
  • Re: API for import?
    ... When you write your own importyou get to define your own API! ... The only bit I found unclear was how Perl manages to DWIM for both: ... Which seems right from a DWIM standpoint. ...
    (comp.lang.perl.misc)
  • Re: Including a source
    ... > do I do this in Perl? ... note that the last expression in 'config' must be true, ... variables in a different package. ... read perldoc -f do, perldoc -f require, and perldoc perlmod. ...
    (comp.lang.perl.misc)