Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: String differs from printing to STDOUT and printing to file

by rjt (Curate)
on Oct 23, 2019 at 10:40 UTC ( [id://11107882] : note . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use 5.010;
    use strict;
    use warnings;
    ...
    open my $debug, '>>', 'debug.txt' or confess "Couldn't open file: $!";
    printf $debug "%s.\n", $var;
    close $debug;
    
  2. or download this
    $> hexdump -C debug.txt
    00000000  51 65 54 45 76 32 38 30  34 2e 0a                 |QeTEv2804
    +..|
    0000000b