/trunk/Examples/perl5/simple/runme.pl

# · Perl · 23 lines · 8 code · 8 blank · 7 comment · 0 complexity · dc8f98e58d57a66406271707d31693c6 MD5 · raw file

  1. #
  2. # Perl5 script for testing simple example
  3. use example;
  4. # Call our gcd() function
  5. $x = 42;
  6. $y = 105;
  7. $g = example::gcd($x,$y);
  8. print "The gcd of $x and $y is $g\n";
  9. # Manipulate the Foo global variable
  10. # Output its current value
  11. print "Foo = $example::Foo\n";
  12. # Change its value
  13. $example::Foo = 3.1415926;
  14. # See if the change took effect
  15. print "Foo = $example::Foo\n";