Inserting Line Number.

R

rmurthy60

Inserting Line Number

--------------------------------------------------------------------------------

I would like to insert line numbers for all the files in a directory.
So if a directory contains files like foo.c, foo.c1, foo.c2, foo.c3,
foo.c4, I am trying to see and choose one of the numbers to process
it.

1. foo.c1

2. foo.c2

3. foo.c3

4. foo.c4

Can I use __LINE__ or $. to do that or am I wrong?

Any suggestions or ideas would be appreciated.

Thanks

Raghu
 
G

Gunnar Hjalmarsson

I would like to insert line numbers for all the files in a
directory.

Can I use __LINE__ or $. to do that

__LINE__ refers to your program, so it seems not very useful. $. is
certainly a better shot.

Note that this group is defunct and replaced by comp.lang.perl.misc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top