not the best... but it works. qq#blah#; means "blah" so you can use anything not just #.Code:qq# if($blah) { foo(); $blah + 10; } #;
so this really just turns it into a string.
Is there a way to comment out multiple lines in Perl? I'm looking for the equivalent of /* ... */ in C. It's a pain to put the # sign in front of a lot of lines...
not the best... but it works. qq#blah#; means "blah" so you can use anything not just #.Code:qq# if($blah) { foo(); $blah + 10; } #;
so this really just turns it into a string.
#'s are not so bad when using VIM.![]()
Yeah, just hit CTRL-V, then move your cursor down to where you want to end the comments, then press I, then #, then Esc. Now all those lines are commented. You can do CTRL-V, move down, and x to delete the comments, too.
Ain't Vim great?![]()
Vim is probably great, but I don't use it. The question wasn't really how to put the # sign in front of multiple lines, but what is the equivalent of /* ... */ in Perl.Yeah, just hit CTRL-V, then move your cursor down to where you want to end the comments, then press I, then #, then Esc. Now all those lines are commented. You can do CTRL-V, move down, and x to delete the comments, too.
Ain't Vim great?![]()
Bookmarks