perl -Mautodie -we '$app="ApplePerlQuine\@perlmonks.org.app";die"not apple mac"unless${^O}eq"darwin";open$f,"|-","osacompile -o $app";print$f qq~set myPATH to path to me as string\nset myPATH to myPATH & "Contents:Resources:Scripts:main.scpt"\nset myPATH to do shell script"echo " & myPATH & " | tr : / | sed -E \x27s/Macintosh HD//\x27"\ndisplay dialog (do shell script ("osadecompile " & myPATH)) with title "$app" buttons {"Use Perl!"} default button 1\n~;close$f;system("open $app")' #### #!/usr/bin/perl use strict; use warnings; use autodie; die "not apple mac" unless ${^O} eq "darwin"; my $app = "ApplePerlQuine\@perlmonks.org.app"; open my $f, "|-", "osacompile -o $app"; print $f qq~set myPATH to path to me as string set myPATH to myPATH & "Contents:Resources:Scripts:main.scpt" set myPATH to do shell script "echo " & myPATH & " | tr : / | sed -E \x27s/Macintosh HD//\x27" display dialog (do shell script ("osadecompile " & myPATH)) with title "$app" buttons {"Use Perl!"} default button 1\n~; close $f; system("open $app"); #### perl -Mautodie -we '$app=qq(ApplePerlQuine\@perlmonks.org.app);die"not apple mac"unless${^O}eq"darwin";open$f,qq(|-),qq(osacompile -o $app);print$f qq(set myPATH to path to me as string\nset myPATH to myPATH & "Contents:Resources:Scripts:main.scpt"\nset myPATH to do shell script"echo " & myPATH & " | tr : / | sed -E \x27s/Macintosh HD//\x27"\ndisplay dialog (\"perl -Mautodie -we \x27\x24app=qq(ApplePerlQuine\134\134\100perlmonks.org.app);\nopen\x24f,qq(|-),qq(osacompile -o \x24app);\nprint\x24f qq\(\" & do shell script ("osadecompile " & myPATH)) & "\);close\x24;system\(\x27\x27open \x24app\x27\x27\)" with title "$app" buttons {"Use Perl!"} default button 1\n\(* This is an ASCII representation of the Perl source used to make this app. It will not cut and paste because of hex and octal tricks. See perlmonks.org/?node=1216984 for details. *\));close$f;system("open $app")'