On Apr 8, 4:22 pm, Jim Gibson <jimsgib...@gmail.com> wrote:
> In article
> <9ad7dab3-81b9-4afb-be94-c5706f2e3...@p25g2000hsf.googlegroups.com>,
>
> mmccaws2 <mmcc...@comcast.net> wrote:
> > How does one print hidden characters like '\n' in perl or cl?
>
> You change them to something printable:
>
> $line = "123\n";
> $line =~ s{\n}{\\n\n}g; # '123\n'
>
> or maybe
>
> $line =~ s{([[:cntrl:]]}{sprintf"\\%x\n",ord($1)}eg; # '123\a'
> print $line;
>
> --
> Jim Gibson
>
> Posted Via Usenet.com Premium Usenet Newsgroup Services
> ----------------------------------------------------------
> ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
> ----------------------------------------------------------
> http://www.usenet.com
Thanks I should've, could've thought of that, but I hadn't
Mike