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

[MacPerl] Re: Variables into MacPerl Ask



Just finished reading the pod about "." for contatinating strings before
reading Charles' message ;) Just about getting the hang of this. Below is the
most recent version of my script. Ant suggestions on opimising? BTW, is there a
string equivilent to "=="?

--nick

################################
#!perl -w

print "\n","###############","\n",@ARGV,"\n";
print join "/", reverse MacPerl::GetFileInfo(@ARGV);
print "\n","###############","\n";

$type = MacPerl::Ask('Type?');
&mime_print;
$creator = MacPerl::Ask($type.'/Creator?');
MacPerl::SetFileInfo($creator, $type, @ARGV);
print "\n","##############################","\n";

sub mime_print {
        if ($type le "TEXT" and $type ge "TEXT") {
                print "\n";
                print "TEXT/ttxt --> SimpleText","\n";
                print "TEXT/MOSS --> Netscape","\n";
                print "TEXT/JyWs --> PageSpinner","\n";
                print "TEXT/McPL --> MacPerl text","\n";
        }
        if ($type le "ttro" and $type ge "ttro") {
                print "\n";
                print "ttro/ttxt --> SimpleText read only","\n";
        }
        if ($type le "GIFf" and $type ge "GIFf") {
                print "\n";
                print "GIFf/ogle --> PictureViewer GIF","\n";
                print "GIFf/GKON --> GraphicConverter GIF","\n";
        }
        if ($type le "JPEG" and $type ge "JPEG") {
                print "\n";
                print "JPEG/ogle --> PictureViewer GIF","\n";
                print "JPEG/GKON --> GraphicConverter GIF","\n";
        }
        if ($type le "MPEG" and $type ge "MPEG") {
                print "\n";
                print "MPEG/ICQA --> ICQ mp3","\n";
                print "MPEG/mAmp --> macAMP mp3","\n";
                print "MPEG/SCPL --> 'MPEG file'","\n";
                print "MPEG/???? --> internet mp3","\n";
        }
}

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org