Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Adding '#' in the beginning of each line

by Sartak (Hermit)
on Aug 16, 2006 at 07:19 UTC ( [id://567617] : note . print w/replies, xml ) Need Help??


in reply to Adding '#' in the beginning of each line

Well, in the real world, I'd do it like so:

perl -ple 's/^/#/'

Whether your instructor has other goals in mind is something else entirely...

Replies are listed 'Best First'.
Re^2: Adding '#' in the beginning of each line
by jdporter (Chancellor) on Jan 24, 2010 at 23:54 UTC