Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: direct data to a socket

by Corion (Patriarch)
on Oct 22, 2014 at 08:57 UTC ( #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? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2023-01-28 16:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?