#!/usr/bin/perl -w use strict; my $msg = '1324^@^@^@'; my $lng = length($msg); print "The length of the message is: $lng\n"; print "This is the message itself: [$msg]\n"; #### cdruser1@cdr1:~/cdr/scripts> ./test1.pl The length of the message is: 7 This is the message itself: [1324]