----- Original Message -----
From: "Robert" <[EMAIL PROTECTED]>
Newsgroups: perl.beginners
To: <beginners@perl.org>
Sent: Tuesday, September 13, 2005 1:39 PM
Subject: Re: Comparing file contents (code included)
Is there a way (since I have the file open) that I can prepend a value (I
need a number to be inserted) onto the line?
Robert
Not sure what 'kind' of number you want. Perl provides the line of the read
file in the variable, $. and I'm guessing you want to prepend 'some' number
to your files being read. (VASH, MONH, MANI).
It all depends on what kind of number you want.
If you want to prepend to one of the read files, you could open them for
inplace editing.
http://perldoc.perl.org/perlfaq5.html#How-can-I-use-Perl's-'-i'-option-from-within-a-program%3f
Chris
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>