logo       


Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: "Secret" operators: msg#00005

Subject: Re: "Secret" operators
Le mardi 01 février 2005 à 18:57, Vladi Belperchinov-Shabanski écrivait:
> On Tue, 1 Feb 2005 15:57:33 +0100
> philippe.bruhat@xxxxxxx (Philippe 'BooK' Bruhat) wrote:
> 
> > 
> > There's also @{[]} but I don't know f it has a name.
> > 
> > Usage: print "splatt @{[ ... ]} pow"
> > where ... is any valid expression, and the result list is join()ed with $"
> > (space).
> 
> [] construct reference to anonymous array, @{} dereferences the array ref. 
> finally the array is interpolated inside string.
> 
> it is equal to:
> 
>   @a = ( 1, 2, 3 );
>   print "splatt @a pow";
> 
> the only use is to force array context inside string:
> 
>   %a = ( 1, 2, 3 );
>   print "splatt @{[%a]} pow";
>   
> but don't think it is usefull (except obfuscation bonus:))

I won't defend its usefulness (we're here for fun), but sometimes you
don't want to type

    use Acme::MetaSyntactic 'batman';
    print "splatt " . join( " ", metaname(3) ) . " pow";

when

    use Acme::MetaSyntactic 'batman';
    print "splatt @{[metaname 3]} pow";

will do.

-- 
 Philippe "BooK" Bruhat

 A reputation is only as good as the truth beneath it, if any.
                                    (Moral from Groo The Wanderer #91 (Epic))



Ruby Jobs
Java Jobs
Jobs in California
more...
what
job title, keywords
where
city, state, zip
jobs by job search
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
db.firebase.por...    text.xml.xalan....    qnx.openqnx.dev...    user-groups.zar...    internationaliz...    kde.devel.konve...    finance.e-gold....    emacs.latex.pre...    gis.therion/200...    web.webmin.gene...    yellowdog.gener...    vserver/2003-08...    redhat.release....    sysutils.tivoli...    xfree86.expert/...    mail.becky.user...    hardware.netapp...    netbsd.ports.xe...    python.distutil...    boot-loaders.gr...    culture.interne...    java.springfram...    activedir/2006-...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe