in reply to Re: String manipulation
in thread String manipulation
As you can see I print the string to screen before I save it to file and on the screen it looks perfect, everything lines up fine etc with no "^@" characters at all ever which makes me believe that this is not actually a string as such but some control character. That being the case do you think the code you provided will still work? I will try it and let you know.my $sock = new IO::Socket::INET( PeerAddr => $host, PeerPort => $port, Proto => "tcp",) or die "Cannot connect to PBX on address $host port $port: $!"; while (<$sock>) { print; # print to screen as well to show raw data and connection chomp($_); open(DAT,">>$filename") || die("Cannot open smdr file"); print DAT $_; close(DAT);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: String manipulation
by GrandFather (Saint) on Aug 07, 2007 at 21:18 UTC | |
by bajangerry (Sexton) on Aug 07, 2007 at 21:49 UTC | |
by graff (Chancellor) on Aug 07, 2007 at 22:28 UTC | |
by GrandFather (Saint) on Aug 07, 2007 at 22:20 UTC |