logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: Linus sequence: msg#00010

Subject: Re: Linus sequence
Phil Carmody <thefatphil@xxxxxxxxxxx> wrote:

> > 2. Use a punctuation variable (like $,) instead of $s, so that
> >    you don't have to use the braces when interpolating.
> 
> I tried that with one punctuation variable, but it didn't work,
> it appears that assignment to it refused to accept strings, so I
> plodded on without!

Yes, punctuation variables are essential to golf, but you have 
to learn which ones are useful in which circumstances.  Most of 
them are magical in various ways.  Some only accept integers, 
as you found.  I think the only ones usable for your case are 

    $*  $#  $,  $.  $@  $}

I was a bit surprised by $., but it appears it can be a string 
if you're not reading from a filehandle.

-- 
Keith C. Ivey <kcivey@xxxxxxxxx>
Washington, DC





Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>