On Jan 21, Saadat Saeed said:

>  opendir(DIR,"\\\\$line\\c\$\\Docume~12") or
>    errornos($line,1,NEW);
[snip]
>sub errornos($machine,$errorno,FIL) {
>       print FIL "error $errorno $machine";
>}

>For some reason the above code doesn't pass parameters
>to my subroutine????? How & why or am I misguided here!

I don't know what Perl documentation you've read, but Perl subroutines
don't look like that.  You don't "declare parameters".

  errornos($line, 1, \*NEW);

  # ...

  sub errornos {
    my ($machine, $errorno, $fh) = @_;
    print $fh "error $errorno $machine\n";
  }

Where did you pick up your current idea about Perl's subroutines?

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.
[  I'm looking for programming work.  If you like my work, let me know.  ]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to