This file contains hidden or 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
$arg = ' ' . shift @ARGV; | |
$script = qq[perl pipe1.pl $arg]; | |
system(q{perl -e "print qq[hi$/there$/]" | } . $script); | |
use IPC::Open2 "open2"; | |
$pid = open2($out, $in, $script); | |
$|=1; | |
print $in qq[hi$/there$/]; |
This file contains hidden or 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
package accessor_maker; | |
sub import { | |
no strict 'refs'; | |
*{ caller() . '::' . 'foo' } = sub { $_[0]->{ 'foo' } }; | |
} | |
1; |
This file contains hidden or 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
# original weirdness: same result changing local to my and if(){} to bare {} | |
sub weird { | |
my ($c) = @_; | |
if( ref $c ){ | |
return (ref $c eq 'SCALAR' ? 't' : do { local $/; warn "# doing\n"; 'do'; }); | |
} | |
return 'r'; | |
} | |
# fix: no local, no my |
This file contains hidden or 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
" ~/.vim/after/syntax/perl.vim | |
let s:bcs = b:current_syntax | |
unlet b:current_syntax | |
syntax include @SQL syntax/sql.vim | |
let b:current_syntax = s:bcs | |
" match optional, surrounding single or double quote and any whitespace in the heredoc name | |
syntax region perlHereDocSQL matchgroup=Statement start=+<<\(['"]\?\)\z(\s*SQL\s*\)\1+ end=+^\z1$+ contains=@SQL |
This file contains hidden or 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 | |
# This chunk of stuff was generated by App::FatPacker. To find the original | |
# file's code, look for the end of this BEGIN block or the string 'FATPACK' | |
BEGIN { | |
my %fatpacked; | |
$fatpacked{"Devel/PatchPerl.pm"} = <<'DEVEL_PATCHPERL'; | |
package Devel::PatchPerl; | |
BEGIN { | |
$Devel::PatchPerl::VERSION = '0.32'; |
NewerOlder