Skip to content

Instantly share code, notes, and snippets.

@roopeshvaddepally
Created October 14, 2012 12:32
Show Gist options
  • Save roopeshvaddepally/3888415 to your computer and use it in GitHub Desktop.
Save roopeshvaddepally/3888415 to your computer and use it in GitHub Desktop.
heredocs in perl and ruby
rv@v:~$ perl -e "print <<'...';
hello
world
...
"
hello
world
rv@v:~$ ruby -e "puts <<'...'
hello
world
...
"
hello
world
# I have used heredocs in perl and ruby before, but I didn't know you can
# add the quotes and semi-colon in the first list and make it work
# have to see how emacs highlights the code
@roopeshvaddepally
Copy link
Author

ruby mode got a much better highlighting than perl-mode. shoot.

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