Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Output:main () { my $string = foo(@arr); print "string outside function is " + $string; } foo() { //create string print "String inside function is " + $string; return $string; }
string inside function is "abc####123####-6####20111112 ..."
string outside function is "abc####123####-6###^M20111112 ..."
If you observe closely one # is replace by ^M character..Any help would be appreciated. Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl adding non printable characters in the return value
by Stamm (Sexton) on Nov 28, 2011 at 13:16 UTC | |
|
Re: Perl adding non printable characters in the return value
by cdarke (Prior) on Nov 28, 2011 at 13:18 UTC | |
|
Re: Perl adding non printable characters in the return value
by Anonymous Monk on Nov 28, 2011 at 12:33 UTC | |
|
Re: Perl adding non printable characters in the return value
by ansh batra (Friar) on Nov 28, 2011 at 13:15 UTC |