Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

commenting out code

8 views
Skip to first unread message

mfield

unread,
Jan 23, 2003, 5:18:05 PM1/23/03
to
I was wondering if there is an easy way to comment out large sections of
code in perl (using emacs) without commenting out the lines
individually. Thanks in advance

Ryan Shondell

unread,
Jan 23, 2003, 5:25:14 PM1/23/03
to
mfield <mfi...@ernie.botany.ubc.ca> writes:

Embedded POD.

perldoc -q "comment out"

--
Ryan Shondell <shon...@cis.ohio-state.edu>

monkeys paw

unread,
Jan 23, 2003, 5:27:09 PM1/23/03
to
mfield wrote:

=comment

lotsa code...

=cut

Jay Tilton

unread,
Jan 23, 2003, 5:44:58 PM1/23/03
to
mfield <mfi...@ernie.botany.ubc.ca> wrote:

: I was wondering if there is an easy way to comment out large sections of


: code in perl (using emacs) without commenting out the lines
: individually.

You might find Acme::Comment interesting.

Eric J. Roode

unread,
Jan 23, 2003, 9:07:51 PM1/23/03
to
mfield <mfi...@ernie.botany.ubc.ca> wrote in news:3E306A1D.BB777F53
@ernie.botany.ubc.ca:

> I was wondering if there is an easy way to comment out large sections of
> code in perl (using emacs) without commenting out the lines
> individually. Thanks in advance
>

If you're using cperl-mode (you should be), then it's M-x comment-region.

--
Eric
print scalar reverse sort qw p ekca lre reh
ts uJ p, $/.r, map $_.$", qw e p h tona e;

Bullet

unread,
Jan 24, 2003, 1:48:42 AM1/24/03
to
cperl-mode .. is that somehow different from perl-mode?

I just do M-x perl-mode then you can use M-x comment-region..

You need to mark your region first.. by going to the beginning and hitting
Ctrl-Space to mark the beginning then.. direction keys to the end.. and
Ctrl-Space again..

Then the region is marked.. and you can use M-x comment region..


Jens Hoehne

unread,
Jan 24, 2003, 3:54:40 AM1/24/03
to
Bullet wrote:
>
> cperl-mode .. is that somehow different from perl-mode?
Yep. Quite.
Heaps of Options - basically it's like the auctex equivalent for tex
files. You just can't live without it. I like C-c C-e for automatic
paranthese insertation.
Try it out with M-x cperl-mode.

Regards,
Jens

Abigail

unread,
Jan 26, 2003, 11:18:52 AM1/26/03
to
mfield (mfi...@ernie.botany.ubc.ca) wrote on MMMCDXXXII September
MCMXCIII in <URL:news:3E306A1D...@ernie.botany.ubc.ca>:
@@ I was wondering if there is an easy way to comment out large sections of
@@ code in perl (using emacs) without commenting out the lines
@@ individually. Thanks in advance


<<m=~m>>
Use the secret operator on the previous line.
Put your comments here.
Lots and lots of comments.

You can even use blank lines.
Finish with a single
m
;

Abigail
--
sub f{sprintf'%c%s',$_[0],$_[1]}print f(74,f(117,f(115,f(116,f(32,f(97,
f(110,f(111,f(116,f(104,f(0x65,f(114,f(32,f(80,f(101,f(114,f(0x6c,f(32,
f(0x48,f(97,f(99,f(107,f(101,f(114,f(10,q ff)))))))))))))))))))))))))

Bharathi

unread,
Jan 29, 2003, 3:15:30 AM1/29/03
to
All,
Any idea of how to do automatic ftp in PERL. I am PC at office. I have a
bunch of files in th unix systetm that needs to send to a ftp server . Is
there anway way I can write a PERL script run it on my PC ( Have PERL
installed) its over. Any help is appeciated.


1.myfile.txt (UNIX system)
2.Use PERL to move it to the ftp server ( Any help here. Have no clue how
to do)
3. Crypt the file( myfile.txt->myfile.txt.gpg) on the ftp server by doing a
telnet using PERL ( Any help?)

TIA
Bharath

Tassilo v. Parseval

unread,
Jan 29, 2003, 3:45:43 AM1/29/03
to
Also sprach Bharathi:

> Any idea of how to do automatic ftp in PERL. I am PC at office. I have a
> bunch of files in th unix systetm that needs to send to a ftp server . Is
> there anway way I can write a PERL script run it on my PC ( Have PERL
> installed) its over. Any help is appeciated.

It's either Perl (the language) or perl (the actual interpreter), but
never PERL.

> 1.myfile.txt (UNIX system)
> 2.Use PERL to move it to the ftp server ( Any help here. Have no clue how
> to do)

perldoc Net::FTP

Since it appears to be a text file, be sure to set transfer mode to
ascii (might not be necessary when transferring the file between two
systems with the same newline semantics).

> 3. Crypt the file( myfile.txt->myfile.txt.gpg) on the ftp server by doing a
> telnet using PERL ( Any help?)

perldoc Net::Telnet

Use it to connect to the remote host and issue the commands necessary to
encrypt the file.

Tassilo
--
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval

0 new messages