View Single Post
Old Nov 6th, 2006, 4:08 AM   #2
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5 Arevos is on a distinguished road
In perl, you can't pass arguments via the subroutine definition. Instead, you pull the subroutine's arguments from the list @_. Try this instead:
perl Syntax (Toggle Plain Text)
  1. sub fib
  2. {
  3. ($n) = @_;
  4. ...
  5. }
Arevos is offline   Reply With Quote