Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^3: Perl Windows vs Cygwin installs

by Eliya (Vicar)
on Mar 23, 2012 at 23:56 UTC ( [id://961335]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/local/perl/5.15.8/bin/perl -w
    
    ...
    
    open my $out, ">:crlf:encoding(UTF-16LE)", $fname or die;
    print $out "\x{feff}\x{1234}\n\x{5678}\n";
    
  2. or download this
    $ ./test-out.pl
    $ hexdump foo.utf16 
    0000000 feff 1234 0a0d 7800 0d56 000a          
    000000c
    
  3. or download this
    $ hexdump foo.utf16 
    0000000 feff 1234 000d 000a 5678 000d 000a     
    000000e
    
  4. or download this
    #!/usr/local/perl/5.15.8/bin/perl -w
    use Devel::Peek;
    ...
    open my $in, "<:crlf:encoding(UTF-16LE)", $fname or die;
    $/ = undef;
    Dump <$in>;
    
  5. or download this
    $ ./test-in.pl
    SV = PV(0x77dc60) at 0x953728
    ...
      PV = 0x829130 "\357\273\277\341\210\264\r\n\345\231\270\r\n"\0 [UTF8
    + "\x{feff}\x{1234}\r\n\x{5678}\r\n"]
      CUR = 13                                ^               ^
      LEN = 14
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://961335]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2024-04-19 20:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found