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

Re: [IO::Pty] How to read from and write to slave?

by choroba (Chancellor)
on Jul 04, 2014 at 06:40 UTC ( #1092243=note: print w/replies, xml ) Need Help??


in reply to [IO::Pty] How to read from and write to slave?

I don't know much about pseudo terminals. Just for curiosity, I tried your code on a Linux machine. I had to modify == to eq to prevent lots of warnings. I also get a different output if I change chomp to s/\s+$// (there was "\r" present). To reduce the output, I also print only if length $line. 2, 4, and 6 never get to the output, but sometimes, I get something like:
TIME: Fri Jul 4 08:38:34 2014 OUTPUT: 1 TIME: Fri Jul 4 08:38:34 2014 OUTPUT: 3 TIME: Fri Jul 4 08:38:34 2014 OUTPUT: 1 TIME: Fri Jul 4 08:38:34 2014 OUTPUT: 3 TIME: Fri Jul 4 08:38:34 2014 OUTPUT: 1 TIME: Fri Jul 4 08:38:34 2014 OUTPUT: 3 TIME: Fri Jul 4 08:38:34 2014 OUTPUT: 1 TIME: Fri Jul 4 08:38:34 2014 OUTPUT: 3 TIME: Fri Jul 4 08:38:34 2014 OUTPUT: 1 TIME: Fri Jul 4 08:38:34 2014 OUTPUT: 3 TIME: Fri Jul 4 08:38:34 2014 OUTPUT: 1 TIME: Fri Jul 4 08:38:34 2014 OUTPUT: 3 TIME: Fri Jul 4 08:38:34 2014 OUTPUT: 1 TIME: Fri Jul 4 08:38:34 2014 OUTPUT: 3 TIME: Fri Jul 4 08:38:34 2014 OUTPUT: 1 TIME: Fri Jul 4 08:38:34 2014 OUTPUT: 3 TIME: Fri Jul 4 08:38:34 2014 OUTPUT: 1 TIME: Fri Jul 4 08:38:34 2014 OUTPUT: 3 TIME: Fri Jul 4 08:38:34 2014 OUTPUT: 1 TIME: Fri Jul 4 08:38:34 2014 OUTPUT: 3 TIME: Fri Jul 4 08:38:34 2014 OUTPUT: 1 TIME: Fri Jul 4 08:38:34 2014 OUTPUT: 3 TIME: Fri Jul 4 08:38:34 2014 OUTPUT: 1

Something weird's going on.

لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1092243]
help
Chatterbox?
[TCLion]: at least that's the plan
[1nickt]: Corion this looks good, from the pod: "there are 9000+ variations that are detected correctly in the test files (see t/data/* for most of them). If you can think of any that I do not cover, please let me know."
[TCLion]: some moron put the date like this : Mon Feb 20 09:31:30 2017
[Corion]: 1nickt: Yes, the module sounds promising indeed
[1nickt]: "putting the date in correct order" how?
[Corion]: TCLion: Whee ;)
[TCLion]: need to put like this : 2017-02-20 09:30:53
[1nickt]: That's why I asked if you are using DateTime. It has a large number of supporting modules (the author likes the term 'eco-system') so if you are already creating a DateTime obj from your dates, this module would read in the mnoron-formatted 1s seamlessly
[TCLion]: when I put the date together it looks like : 2017-Feb-24 (month is the problem)
[1nickt]: good luck, then.

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (14)
As of 2017-03-23 14:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (288 votes). Check out past polls.