LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   if you run perl, could you test this script: (https://www.linuxquestions.org/questions/programming-9/if-you-run-perl-could-you-test-this-script-571015/)

2007fld 07-20-2007 03:57 PM

if you run perl, could you test this script:
 
I just installed MATH::PARI.
I would like to test it by running the following two simple examples on CPAN. When I run them, they didn't give me some mathematic result as I expected. If anyone using perl, could you run these two and see what the results should be? I guess you need to have MATH::PARI.

If anyone can tell me what these codes mean, I'll also really appreciate.

test_pari_1.pl:
#!/usr/bin/perl

use Math::Pari;
$a = PARI 2;
print $a**10000;

test_pari_1.pl:
#!/usr/bin/perl

use Math::Pari qw(Mod);
$a = Mod(3,5);
print $a**10000;

Thanks!

wjevans_7d1@yahoo.co 07-20-2007 05:21 PM

First, when posting code, please put it between CODE markers. The easiest way is to do this:
  1. Click the Go Advanced button at the bottom of your editing window.
  2. In the new editing window, highlight the code with your mouse.
  3. Click the # icon at the top of the editing window.

Thank you. (grin)

Second, rather than asking us to run this stuff, it would be more expeditious if you ran this stuff yourself and posted the result. To do so:
  1. Run the program script. It will present you with a shell prompt.
  2. At that shell prompt, run the script about which you have questions.
  3. After the script is done running, enter the exit command at the shell prompt.
  4. Post the content of the file typescript that's sitting in your current directory. Post it between CODE markers, as outlined above.


All times are GMT -5. The time now is 07:08 AM.