Help for this page

Select Code to Download


  1. or download this
    $ perl -e 'my $x = "abc\r"; print "|$x|"'
    |abc
    
  2. or download this
    $ perl -e 'my $x = "abc"; print "|$x|"'
    |abc|
    
  3. or download this
    $ perl -E 'my @x = ("A", "B\n", "C\r", "D\r\n"); for (@x) { say ord fo
    +r split //; }'
    65
    ...
    68
    13
    10
    
  4. or download this
    $ perl -E 'my @x = ("A", "B\n", "C\r", "D\r\n"); for (@x) { chomp; say
    + ord for split //; }'
    65
    ...
    13
    68
    13
    
  5. or download this
    $ perl -E 'my @x = ("A", "B\n", "C\r", "D\r\n"); for (@x) { s/\R$//; s
    +ay ord for split //; }'
    65
    66
    67
    68
    
  6. or download this
    $ perl -E 'my @x = ("A", "B\n", "C\r", "D\r\n"); for (@x) { s/[\r\n]*$
    +//; say ord for split //; }'
    65
    66
    67
    68