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

Re: [MacPerl] 99 bottles




> Cute!  I had to replace some "s"'s with "S", because BBEdit and Macperl
> were confusing it with the substitution operator.  I also had to replace
> all "q" with "Q" for a similar reason.

I'll have a complete discussion of this "problem," and another 
work-around in my forthcoming article on "Speaking MacPerl," due out 
hopefully in the December issue of PerlMonth (maybe).

Placing 's' and 'q' in single-quotes suppresses interpolation. Neither 
BBEdit (which will otherwise add inappropriate syntax coloring), nor 
MacPerl will there-after see those as being reserved words.  This is not 
actually a problem within Perl itself, which interprets the hash items 
correctly.  It also isn't a problem if you're using Alpha as your editor 
(which David is).

I prefer to use the single-quotes to show literally $acc{'s'} and 
$dur{'q'} rather than s}} and q}} which although obsfucated could be 
valid expressions.

Also note that my version means only making a change to the initial 
assignments and not to every occurance of "q" or "s".

--B

# Fungal Parataxonomy                   Mycology Information (Mycoinfo)
# Webmaster, Staff Writer      **The World's First Mycology E-Journal**   
# <mailto:webmaster@mycoinfo.com>            <http://www.mycoinfo.com/> 
#
# First they ignore you. Then they laugh at you. Then they fight you.
# Then you win.                                     --Mohandas Gandhi


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