#!/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");