I have the following code, I wrote to truncate large values.
sub truncate_large_email_tag
{
my($email_tag) = @_;
my $size = length($email_tag);
if ($size>5000) {
my $fragment = substr($email_tag,0,5000);
$email_tag = $fragment;
#log_it( "\n\Truncated Large Email tags\n\n") if $TRACE;
}
and I am calling this subroutine using the call in another subroutine say
sub do_something
{
#some code here # CFG_PASS is a hash
$EMAIL{$tag}=$CFG_PASS{$typ}{$tag}{$where . '_DEFAULTS'}; #Email
#tag initialized here
truncate_large_email_tag($EMAIL{$tag});
}
But when I check $EMAIL{$tag} is still pointing to non-truncated value. am I doing something wrong?