Cameron: In eplsite i use the next routine to get the list of files from a directory:
$langdir ="."; # it means actual directory but you can specify a different opendir (LANGUAGEDIR,$langdir) || die "ca not opendir $langdir: $!"; rewinddir(LANGUAGEDIR); @languages = grep { /.epl/ } readdir(LANGUAGEDIR); foreach (@languages) { ($nothing,$lang1) = split('\-',$_); ($language,$nothing) = split('\.',$lang1); $thelanguages .='<option value="'.$language.'">'.$language.'</option>'; } closedir(LANGUAGEDIR); I hope this helps Carlos Kassab > > Hi, > > I am trying to use Embperl to scan a directory of files... I call a > package that uses Cwd and File::Find. It returns the list of files. > However, when I run it from the Embperl code I get: > > [error] [2306]ERR: 24: Error in Perl code: chdir: Illegal seek > > I have read the documentation on Safe and Opcodes... But they are > confusing to me... > > They seem to indicate that in order to define and use optOpcodeMask, > you must setup a Safe compartment. Am I mistaken, or isn't there > already a Safe compartment which is preventing chdir from working now? > How can I allow this function? > > Thanks, > Cameron > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]