develooper Front page | perl.fwp | Postings from November 2007

Re: The "flaming X-wing" secret operator

Thread Previous | Thread Next
From:
Mr. Shawn H. Corey
Date:
November 28, 2007 14:10
Subject:
Re: The "flaming X-wing" secret operator
Message ID:
474DE735.5030901@magma.ca
Philippe Bruhat (BooK) wrote:
> Hi,
> 
> Just thought I should share this with the FWP crowd.
> 
> I had to do something special with the first line of a file, before
> running the whole while(<>) loop on it. I ended up with this:
> 
>     @data{@fields} =<>=~ $re;
> 
> Rafael helped me give this new operator a name (#perlfr transcript):
> 
>     15:13 <@BooK> OMG c'est quoi =<>=~ comme secret op ?
>     15:14 <@rgs> le x-wing touché avec une aile en feu
> 
> Rough translation:
> 
>     15:13 <@BooK> OMG what is =<>=~ for a secret op ?
>     15:14 <@rgs> the hit x-wing starfighter with a wing on fire
> 
> Cog, are you still writing this OGSOP book? ;-)
> 

Actually, it's:

  @data{@fields} = ( <> =~ $re );


-- 
Just my 0.00000002 million dollars worth,
  Shawn

+------------\
| Shangri La  \
| 40,000 km   /
+------------/


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About