every time i try to run my program (driver) is receive the following error message, arithmetic.pm did not return a true value at ./driver line 9, begin failed--compilation aborted at ./driver line 9 can anyone help me sort this out? thank you very much

#!/usr/bin/perl -w #Driver #program by James Park #last revision on friday, september 23rd. #purpose this program driver will call on the arithmetic.pm file to fi +nd and use the correct #functions use strict; use lib "."; use arithmetic; sub menu{ print"please choose an option from the menu below:"; print"1. use the greatest common devisor function."; print"2. use the least common multiple function."; my $m = <STDIN>; print"enter the first number: "; my $a = <STDIN>; print "enter the second number:"; my $b = <STDIN>; if ($m = 1 ){ my $gcd; $gcd = arithmetic::gcd($a,$b); print "gcd of ($a,$b) = $gcd"; }else{ my $lcm; $lcm = arithmetic::lcm($a,$b); print "lcm of ($a,$b)= $lcm"; } }
#arithmetic.pm #!/usr/bin/perl -w use strict; package arithmetic; sub gcd() { my ($a, $b) = @_; ($a,$b) = ($b,$a) if $a > $b; while ($a) { ($a, $b) = ($b % $a, $a); } return $b; } sub lcm { my ($a,$b)=@_; return $a*$b/&gcd($a,$b); } ]

In reply to using libaries by jrp370

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.