Thank you Tom!
We realy have lots of ways to do everything. In this case, is easier to use
$^I functionality, and I did. Although, it is very nice to see this code
bellow.
Cheers!
""Tom Phoenix"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On 5/15/07, Bruno Schroeder <[EMAIL
On 5/15/07, Bruno Schroeder <[EMAIL PROTECTED]> wrote:
I tryed to use seek but it did not work. Can you help me on that, please? I
am using Windows XP. The following example writes at the end of the file.
use strict;
my $file = "teste_rw.txt";
open (FILE, "+<", $file) or die "Can not open $file
Hello Tom!
Hello All!
You helped a lot Tom. Still... I have some trouble.
For sure $^I is easier to use. Although in my case i would need to rewrite a
lot of code. I will do it, but it will take a while to test it. I found good
information on $^I at
http://perldoc.perl.org/perlfaq5.html#How-ca
On 5/15/07, Ken Foskey <[EMAIL PROTECTED]> wrote:
> It looks as if you're trying to edit a text file "in place". Although
> that's possible for some simple cases, it's generally easier to use
> Perl's $^I functionality.
>
What is $^I?
It is a special scalar variable that turns on/off in-place
> It looks as if you're trying to edit a text file "in place". Although
> that's possible for some simple cases, it's generally easier to use
> Perl's $^I functionality.
>
What is $^I?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn
On 5/14/07, Bruno Schroeder <[EMAIL PROTECTED]> wrote:
I am trying to read and write in a file, I am using something like:
open (FILE, "+
A little better is to include $! in the message, maybe like this:
open FILE, "+
for my $line () {
print $line;
if($line eq "X\n")
{
print F