Help for this page

Select Code to Download


  1. or download this
    $ cat posix.pl 
    #!/usr/bin/env perl 
    ...
    Argument "Ì" isn't numeric in sprintf at ./posix.pl line 6.
    abU+0000
    $
    
  2. or download this
    #!/usr/bin/env perl 
    use strict;
    ...
    my $str = "ab\x{cc}";
    $str =~ s/(\P{PosixPrint})/sprintf("U+%04X", ord $1)/eg;
    print "$str\n";