in reply to Re: print Is Substituting Characters At Beginning Of String
in thread print Is Substituting Characters At Beginning Of String

Perfect! That was exactly it. Thank you!

  • Comment on Re^2: print Is Substituting Characters At Beginning Of String

Replies are listed 'Best First'.
Re^3: print Is Substituting Characters At Beginning Of String
by Athanasius (Cardinal) on Jan 15, 2016 at 09:04 UTC

    Hello shilo,

    As an aid to debugging, you can configure Data::Dumper to print whitespace characters (other than spaces) as backslash sequences by setting the $Data::Dumper::Useqq configuration variable:

    18:58 >perl -MData::Dumper -wE "my $s = qq[\tabc\r\n]; print Dumper($s +); $Data::Dumper::Useqq = 1; print Dumper($s);" $VAR1 = ' abc '; $VAR1 = "\tabc\r\n"; 18:58 >

    But I generally prefer Data::Dump, which does this by default:

    18:58 >perl -MData::Dump -wE "my $s = qq[\tabc\r\n]; dd $s;" "\tabc\r\n" 19:00 >

    Hope that helps,

    Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,

      I am definitely going dig into this a little deeper. It seems strange that the CR characters left at the end of the lines read from the $input_fh filehandle are getting hung up on STDOUT, or print()'s ability to print to STDOUT...

      thanks,

      david...