Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Terminal Client

by Krambambuli (Deacon)
on Oct 24, 2008 at 15:18 UTC ( #719360=note: print w/ replies, xml ) Need Help??


in reply to Terminal Client

What if you use

$MySocket->send(0x02);
?

Krambambuli
---


Comment on Re: Terminal Client
Download Code
Re^2: Terminal Client
by JavaFan (Canon) on Oct 24, 2008 at 15:23 UTC
    send assumes its argument is a string. 0x02 is 2, and as a string equals "2".
Re^2: Terminal Client
by juster (Friar) on Oct 26, 2008 at 06:04 UTC

    I like your approach and I think this is what you meant:

    $MySocket->send("\x02");

    This seems the most straightforward to me. I have a personal preference of hex over octal.

    Update: Oops. At first I only saw JavaFan's pack approach in the reply below this. Be he already covered this approach too. Sorry for duplicates.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2014-10-02 05:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (49 votes), past polls