Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Help adding STX and ETX to data string in Perl

by jwkrahn (Abbot)
on Jul 19, 2022 at 05:19 UTC ( [id://11145582]=note: print w/replies, xml ) Need Help??


in reply to Help adding STX and ETX to data string in Perl

my $Message = $_; # Calculate Length of Message my $MsgLgth = 18 + length $Message; if ( $MsgLgth > 9 && $MsgLgth < 1_000_000 ) { $Message = sprintf "\x2%08d00000000%s\x3", $MsgLgth, $Message } else{ # Max length is 300_000 # If hit here, too long ... by a LOT print "Formated Message exceeds MaxMessageLength\n\n"; }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-04-25 09:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found