Just another Perl shrine | |
PerlMonks |
Re: Quote and Quote-like Operatorsby Anonymous Monk |
on Dec 15, 2011 at 11:51 UTC ( [id://943706]=note: print w/replies, xml ) | Need Help?? |
FWIW, heredocs aren't ugly :) if text is more than one line, heredocs are my first choice, of the form
I've often pasted multiline text and had to adjust the delimiters, ditching '' and "" and {} for q~~. With heredocs this is very rare. I've had HERE or EOF show up a few times, but virtually never __EOF__, which I also like for its similarity to __DATA__ and __END__ Its part of my template, I even have a hotkey in my editor for heredocs I also prefer qw' l i s t ' or qw/ l i s t/ because no shift key is involved, and its all pinky action (on QWERTY keyboard), use CGI 3.55 qw/ param /; use Data::Dump qw' dd '; for oneliner portability, i prefer qq// and q//, much easier to move between shells , only have to change leading/trailing "" into '' and vice versa For match/substitution, i prefer s/// and then to avoid leaning toothpick syndrome i switch to one of s;;; s=== depending on the regex, similarly because shift isn't required, and its all pinky action :) for larger regex I always use balanced s{}{}ex; or
though the options are ridiculous :D
you're correct, you definitely want to avoid alphanumeric for delimiters, esp fancy unicode
In Section
Meditations
|
|