title: Perl error comes in recursive function process
body: <p>How to solve Perl error comes up when recursive function running</p>
  <pre><code>main::getE_Path_Rec() called too early to check prototype at ./test.pl line 28
  </code></pre>
  <p>shown by cat -n:</p>
  <pre><code>13  our ($whole, @result);
  14
  15  sub getE_Path_Rec ($\@$) { my ($path, @iOffNode, $offset) = @_;
  16  
  17      $path=~ s#^/([^/]+)(.*)$#$2#;
  18      my @OffNode;    my $eleNow=$1;
  19      for (@iOffNode) {
  20          $eleNow=~ m#^([^[/,]+)(?|\[(\d+|@[^]]+)\]|,(\d+))?#;
  21      #
  22              if($2) {
  23                  getElem($1, $2-1, $_-&gt;[1], @OffNode);
  24                  return undef if !@OffNode;
  25                  if ($path) {
  26      #
  27      #
  28                      getE_Path_Rec( $path, @OffNode, $offset.${$OffNode[0]}[0])
  29                  }else {
  30                      push( @result, [$offset, ${$OffNode[0]}[1]])
  31                  }
  
  36          }
  37  
  38          return
  39  }
  </code></pre>
  <p>How do we solve such in Perl up to the recursive function seamlessly ?</p>