Subject: | ->Set() method does not translate \n to \r\n |
# the following code, when pasted in windows, attaches it all as if it's
one string. in order to get it to not to do that, you have to manually
make a substitution (or any other way) to convert \n's to \r\n's...
use v5.10.0;
use strict;
use Win32::Clipboard;
my $CLIP = Win32::Clipboard();
my $buffer = "happy\njohn\n\nof\nnewark";
say "Trying to copy the following buffer:";
say $buffer;
$CLIP->Set($buffer);