LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-20-2007, 03:57 PM   #1
2007fld
Member
 
Registered: Mar 2007
Distribution: FD4,6
Posts: 52

Rep: Reputation: 15
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!
 
Old 07-20-2007, 05:21 PM   #2
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 31
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I run a perl script in linux izquierdista Linux - Software 6 07-07-2007 10:54 PM
how to run a shell script in the perl script sharad Linux - General 1 05-24-2006 03:23 AM
unable to run perl script using browser madhuri Linux - Distributions 1 11-22-2005 02:19 PM
How to run a perl script as a daemon ? paonethestar Programming 17 11-06-2003 08:53 PM
can't get perl script to run from www victorus Linux - General 0 03-27-2001 05:32 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration