[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Help I can't get Mac::Files to work??



wls@oculus.jsei.ucla.edu writes:
}I've tried efverything, I don't think it's me.  (But I'll bet it is :)
}Other sample things work just fine!!
}
}Anybody have any thoughts as to why this won't work:
}
}# Help!! I can't get this simple thing to work!!
}# wls@isi.edu
}
}use Mac::Files;
}
}my($type) = 'macs';
}print "type = $type\n";
}
}# error: Undefined subroutine &File::FindFolder called.
}my ($systempath) = &File'FindFolder($type);
}print "system path: $systempath\n\n";

There is no subroutine called File::FindFolder.  It's called
Mac::Files::FindFolder, and since you've "use"'d Mac::Files, you can just
say "FindFolder($type)" here.  (You don't need the & if you don't want to
use it.)

(Ferengi rule of programming #34:  The error message *means what it says*).

[snip]

---
Paul J. Schinder
NASA Goddard Space Flight Center
Code 693, Greenbelt, MD 20771
schinder@pjstoaster.pg.md.us