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

[MacPerl] reading pc formated floppies



The script below, when saved as a droplet, prints a mac folder's complete
path then lists the files the folder contains. When I drop a PC formated
disk (not my idea, but the government's) containing text files, on the
droplet it prints the disks name but the gives me error #002, when the
script tries to list the files the disk contains. What am I doing wrong?
Any help is greatly appreciated.


#!/usr/bin/perl -w

$folder_name = "@ARGV";
print "$folder_name\n";

opendir(FOLDER,$folder_name) || die "Could not open $folder_name: $!";
@allfiles = readdir(FOLDER);

foreach $file (@allfiles){
    print "$file\n";
}

Again THANKS for the help!

Doug Spore