Hello, I noticed a strange problem in my app and I have dumbed it down as much as I can to help me figure out what's wrong, but I can't!! Help!

Simply, I pass each line of a text file this function, here:
sub sup09 { my $sup09 = "09"; my $nobloc = $config->{NoBlockCI}; my $trans_date = &timestamp; my $return_date = &timestamp; my $AP = $config->{AP}; my $AO = $config->{AO}; my $AB = "AB".$_[0]; my $AC = $config->{AC}; my $seq = "AY0"; my $message = $sup09.$nobloc.$trans_date.$return_date.$AP.$arnold. +$AO.$arnold.$AB.$arnold.$AC.$arnold.$seq; my $checksum = &Checksum($message); my $sup09string = $message.$checksum; if($logging == 1) { &logging($sup09string); } return $sup09string;
The file I am passing it from is here:
use strict; use warnings; use IO::Socket::INET; require "functions.pm"; our $socket = new IO::Socket::INET ( PeerAddr => '127.0.0.1', PeerPort => 16001, TimeOut => "10", Proto => 'tcp', ) or die "There is no connection to the SUPPY Server..........\n"; my $itemfile = 'inumlist.txt'; #my $send; open (FILE,$itemfile) or die "Cannot file file"; while (<FILE>) { my $print = sup09($_); print "$print"; };

So far, all very simple. The trouble is the function returns the $sup09string with a line break in it and I can't figure out how or why. If I pass a static string to the function (not from the files being read) the function returns the string as one

Can anyone see how silly I am!!!


In reply to Function Oddity by packetstormer

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.