Academic Work Personal
|
Perl /
Arrows in various programming languages
ProblemI always forget how to print a text as-is. Cheat sheetPerl: print <<END; text here END PHP: $data = <<<END text here END; Ruby: long_str = <<EOF first line second line EOF Bash: cat <<END text here END Groovy #1: def id = 100 sql = """ SELECT * FROM table WHERE id = $id """ // $id will be expanded to 100 Groovy #2: def id = 100 sql = ''' SELECT * FROM table WHERE id = $id ''' // '$id' is just a string, won't be expanded Python: long_str = """ first line second line """ |
anime | bash | blogs | bsd | c/c++ | c64 | calc | comics | convert | cube | del.icio.us | digg | east | eBooks | egeszseg | elite | firefox | flash | fun | games | gimp | google | groovy | hardware | hit&run | howto | java | javascript | knife | lang | latex | liferay | linux | lovecraft | magyar | maths | movies | music | p2p | perl | pdf | photoshop | php | pmwiki | prog | python | radio | recept | rts | scala | scene | sci-fi | scripting | security | shell | space | súlyos | telephone | torrente | translate | ubuntu | vim | wallpapers | webutils | wikis | windows Blogs and Dev. * Ubuntu Incident Places Debrecen | France | Hungary | Montreal | Nancy Notes Hobby Projects * Jabba's Codes Quick Links [ edit ] |