in reply to Device::Serial CP290

Welcome to the Monastery.

Please use code tags for your code snippets.

Is the above statement correct ????
That depends on what you want $clock to contain. If you want it to simply be the string FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF05, then the following should be sufficient:
$clock = 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF05';
If you try to print out the value of $clock in your code, you might get:
use warnings; use strict; my $clock = pack('H34','FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF05'); print "clock:$clock:\n"; for (split //, $clock) { print "$_:", ord $_, ":\n"; }

outputs (unprintable characters):

clock:\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uff +ff\uffff\uffff\uffff\uffff\uffff: \uffff:255: \uffff:255: \uffff:255: \uffff:255: \uffff:255: \uffff:255: \uffff:255: \uffff:255: \uffff:255: \uffff:255: \uffff:255: \uffff:255: \uffff:255: \uffff:255: \uffff:255: \uffff:255: :5:

Take a look at pack.

Update: By the way, a more compact way to assign a value to $clock uses the "repetition operator" (see perlop). These 2 lines are equivalent:

$clock = 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF05'; $clock = 'F' x 32 . '05';

Replies are listed 'Best First'.
Re^2: Device::Serial CP290
by Anonymous Monk on May 05, 2008 at 13:04 UTC
    Thanks for the responses to my CP290 code example...(sans code tags ) The pack H definition is what I needed to send a the string of hex Fs... The Device::SerialPort module I'm using is the one that came with PCLINUXOS. I still get no response from the CP290 ... This is a hobby so I don't mind experimenting... I spend a lot of time on the forums and believe me the help I've gotten would fill a good sized howto. Thanks again Ted in Atlanta