Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: direct data to a socket

by Corion (Patriarch)
on Oct 22, 2014 at 08:57 UTC ( [id://1104656]=note: print w/replies, xml ) Need Help??


in reply to Re^2: direct data to a socket
in thread direct data to a socket

This is magic employed by IO::All.

If you want to know the details, IO::All overrides some operators of Perl to make the normal Perl syntax do something different when dealing with IO::All objects.

The expression is simply $a < $b, the comparison expression. Except that the IO::All objects do something different when "compared" with something, to make this syntax appear like shell redirection.

Replies are listed 'Best First'.
Re: direct data to a socket
by jonadab (Parson) on Oct 22, 2014 at 10:43 UTC

    Wow, that's icky. I understand why overloading exists, and needs to exist. Things like being able to subtract two DateTime objects and get a DateTime::duration object are the stuff of which consistent, intuitive behavior are made. But overloading what is normally a comparison operator to do something completely semantically unrelated to comparison doesn't make me smile. If it were in the ACME:: namespace, that would be one thing...

      In C++, a similar situation exists even in the standard: operator>>.
      لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
        Well, yes, but unlike C++, Perl is a language I personally use and mostly like.
Re^4: direct data to a socket
by demoralizer (Beadle) on Oct 22, 2014 at 09:05 UTC
    Now it's clear or at least I know where to search for :)

    Thanks a lot to all of you, for bringing some enlightenment to me!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-19 23:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found