Quote delimiters

Was writing a script and stopped just to write this and ask... what is your favorite quote delimiter? I mean, what do you use to delimit quote words, or regular expressions?

I find out that most of the time I use the slash for regular expressions because with them I can not type the preceding 'm'. But, for instance, on use CGI qw.:standard.; I am liking more the dot. When substituting paths, I prefer to use the exclamation mark.

Rarely I remember that I can use balanced braces. Probably that would be the better choice on most situations, but I forget it...

And you?

5 Comments

I'm partial to // and [] because I can type them on my keyboard without pressing shift which isn't the case with <>(){} etc. . and , are even easier but they'll also easily conflict with whatever I'm typing.

I typically use // for regular expressions and {} for everything else.

Curly braces `{}` are my preferred quote delimiters.

Typically I use {} with m and qr and () with qw.

I mostly use // and sometimes {} when that\s more convenient. I rarely use any of the other options.

Leave a comment

About Alberto Simões

user-pic I blog about Perl. D'uh!