Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: "Secret" operators

by hardburn (Abbot)
on Jan 28, 2005 at 17:48 UTC ( [id://426055]=note: print w/replies, xml ) Need Help??


in reply to "Secret" operators

You may be familer with the spaceship operator already (<=>). What about the Super Star Destroyer operator?

${-} <=$vader=> ${-}

Update: Now complete with TIE Intercepters!

"There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.

Replies are listed 'Best First'.
Re^2: "Secret" operators
by cog (Parson) on Jan 28, 2005 at 18:00 UTC
    Ok, I tried it out and now I have some doubts...

    $a <=$b=> $c is equal to ( $a <= $b , $c), that one is easy...

    But what happens if I just use <=$something=>? Because printing that prints an equal sign, the contents of $something and another equal sign... I'm missing something, here...

      That's the <> operator. =$something= isn't a simple scalar, so it's equivalent to glob("=$something="). On the other hand, <$something> means readline($something). (For special weirdness, <$ something> is the same as glob($something).)

      See glob, readline and I/O Operators in perlop for details.

      I tried <=$vader=> (and also <==>), but they are both syntax errors. That's why I added the TIEs :)

      "There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://426055]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (1)
As of 2024-04-25 19:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found