Skip to content

Instantly share code, notes, and snippets.

@nihen
Created November 6, 2012 16:06
Show Gist options
  • Save nihen/4025695 to your computer and use it in GitHub Desktop.
Save nihen/4025695 to your computer and use it in GitHub Desktop.
perl inline
perl -MO=Deparse hoge.pl
# インライン展開される組
sub inline_q() {
q{myline}
}
sub inline_qq() {
qq{myline}
}
sub inline_hearquote() {
<<'EOF';
myline
EOF
}
# インラインされない組
sub inline_hear() {
<<EOF;
myline
EOF
}
sub inline_hearwquote() {
<<"EOF";
myline
EOF
}
print inline_q();
print inline_qq();
print inline_hearquote();
print inline_hear();
print inline_hearwquote();
@nihen
Copy link
Author

nihen commented Nov 6, 2012

s/hear/here/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment