develooper Front page | perl.fwp | Postings from May 2003

Re: 99 bottles of beer on the wall

Peter Makholm
May 25, 2003 00:36
Re: 99 bottles of beer on the wall
Message ID:
Andrew Savige <> writes:

> OK, I give up, what the hell is this?  $n!=1&&s=>
> Deparse says it is equivalent to:      $n!=1&&'s'

`perldoc perlop` says:

   The => digraph is mostly just a synonym for the comma operator.  It's
   useful for documenting arguments that come in pairs.  As of release
   5.001, it also forces any word to the left of it to be interpreted as a

So it's just used as an obscure way to stringify the s.

But why is it used? If it not just for the obfuscation my only guess
is that it makes it possible to do on the command line without having
to escape a pair of quotes.

 Peter Makholm     |         Perhaps that late-night surfing is not such a |           waste of time after all: it is just the web |                                              dreaming
                   |                                    -- Tim Berners-Lee Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About