Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re^2: "Secret" operators

by cog (Parson)
on Jan 28, 2005 at 18:00 UTC ( #426059=note: print w/replies, xml ) Need Help??

in reply to Re: "Secret" operators
in thread "Secret" operators

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...

Replies are listed 'Best First'.
Re^3: "Secret" operators
by mauke (Novice) on Jan 29, 2005 at 15:54 UTC
    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.

Re^3: "Secret" operators
by hardburn (Abbot) on Jan 28, 2005 at 18:25 UTC

    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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://426059]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (13)
As of 2018-06-22 15:18 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (124 votes). Check out past polls.