This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use feature ':5.10'; | |
use POE; | |
use HTTP::Engine; | |
my $body = "0"x1_000_000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Test page</title> | |
</head> | |
<body> | |
<h1>Test page</h1> | |
Hello, world. | |
<script language="javascript"> | |
document.write("Before: " + top); | |
top = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Carp::Heavy uses some variables in common with Carp. | |
package Carp; | |
=head1 NAME | |
Carp::Heavy - heavy machinery, no user serviceable parts inside | |
=cut | |
# On one line so MakeMaker will see it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use feature ':5.10'; | |
use AnyEvent; | |
use AnyEvent::Handle; | |
open my $fd, '|-', 'perl -ne "sleep 1; print"' or die $!; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use feature ':5.10'; | |
open my $fh, '>', 'test.txt' or die $!; | |
my $reopen = sub() { | |
open $_[0], $_[1]. '&='. fileno($_[2]) or die "failed to reopen: $!"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
perl -MEncode=encode -e 'my $str = "\x{eeffff}"; my $enc = encode("utf-16be", $str); print join q{,}, length $str, do { use bytes; length $enc }' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my $hash = { keys => 'go here', | |
and => 'here', | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my $hash = { | |
keys => 'go here', | |
and => 'here', | |
blocks => sub { | |
'nest like this'; | |
}, | |
}; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[~] 0 (jon@bar) | |
$ perl slave.pl | |
Got 'f' | |
Got 'o' | |
Got 'o' | |
Got '' | |
Got '' | |
Got '' | |
Got 'b' | |
Got 'z' |
OlderNewer