in reply to Re^6: r/w attached infrared head on /dev/ttyUSB0
in thread r/w attached infrared head on /dev/ttyUSB0

But why does it work, when I send the sequences from shell and getting it with cat?

One more guess: the two echo commands in the root node may mean the port is opened and closed twice, I think... you might try replicating that in your Perl code.

(huck's guess was a good one, too bad it didn't work...)