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

RE: [MacPerl] Short intro and request for help



I've gotten the search script from Matt's Script archive  to work with MacPerl
by making minor changes to the "get_files" routine. Make sure you specify
the absolute path to the directory of interest,using colon delimiters. An
example is shown below.

Eoin Fahy
########################################
$basedir = 'myHD:myFolder:myWebfiles';


sub get_files {

opendir(MYFILES, $basedir);

while(defined($filename=readdir(MYFILES))){

push(@FILES,$filename);
#Uncomment the line below to print out a list of the files
#print "$basedir:$filename <BR>\n";
}
##################################################
>I have finally gotten around to joining the list. I am a volunteer helper
>on Matt Wright's scipts help mailing list, offering assistance in
>configuring Matt's scripts to anyone I can. Since I use MacOS, I can
>appreciate many of the difficulties people have trying to do unix or
>windows w/ little or no experience.
>
>I have just started trying to run some of these scripts on my PowerBook w/
>MacHTTP, MacPerl 5.1.3r2 with some success (I'm no perl expert).
>
>Someone asked if I could look at a search script that wasn't working. When
>I inluded the -w switch, the script output the search page with no results
>(as before) but indicated that there were two places where there were
>uninitialized variables.
>
>When I ran the debugger, it seemed that the script was using the Perl
>modules rather than the sub routines to parse, etc.. the info.
>

>>  sub get_files {
>>
>>     chdir($basedir);
>>     foreach $file (@files) {
>************************************
>>        $ls = `ls $file`;
>************************************
>



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch