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

[MacPerl] Here documents (was '' vs q())



>No way.  Here docs rule, and are much easier to use with printf() and
other

>functions/operators.


Not to mention (bringing this back into a MacPerl-specific context)
embedded AppleScript scripts!


<fontfamily><param>Courier</param><bigger>if ($#ARGV << 0) {

  $file = MacPerl::DoAppleScript(<<<<SCRIPT);

    choose file with prompt "Pick a file"
</bigger></fontfamily><bigger><fontfamily><param>Times</param>Â

</fontfamily><fontfamily><param>Courier</param>    of type "TEXT"

SCRIPT

</fontfamily><fontfamily><param>Times</param>...


</fontfamily></bigger>(It's in the Book, MP:PE, ch. 8, p. 123)


No, those thousands of dead programmers would rise up zombie-like and
grab you by the ankle as you tried to step over their dead bodies. 
Here documents are here :-) to stay (thanks Larry).


V.

---

Vicki Brown, vlb@cfcl.com        |\      _,,,---,,_ 

Journeyman Sourceror      ZZZzz /,`.-'`'    -.  ;-;;,_ 

Scripts & Philtres             |,4-  ) )-,_. ,\ (  `'-'

http://www.cfcl.com/~vlb      '---''(_/--'  `-'\_)

P.O. Box 1269 San Bruno, CA  94066

</x-rich>