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

Re: [MacPerl] several dumb questions



>OK, another opportunity to show off the Mac toolbox features:
>
>#!perl
>#
># Print name of the Machine as defined in Sharing Setup
>#
>use Mac::Resources;
>use Mac::Types;
>use Mac::Memory;
>
>$res = CurResFile();
>UseResFile(0);
>$name = Get1Resource('STR ', -16413);
>print MacUnpack('STR ', $name->get), "\n";
>UseResFile($res);

Anyway to avoid AppleScript is a "good thing!"


#================================================================
perl -e 'srand();if(rand>.5){$i=0;foreach(@ARGV){@$i=split(//);$z
[$i]=0;foreach(@$i){$s[$i][$z[$i]]=$_;$z[$i]++;}$i++;}foreach(@s)
{foreach(@$_) {print}print" ";$_++}}else{print(join(" ", @ARGV))}
print"\n"' McClellan Clan Motto: Think On

Chris Nandor                                       pudge@pcix.com
PGP Key 0xB76E72AD                    http://pudge.petersons.com/