>
> Hi owen,
>
> Please help me in resolving errors in the following script
>
> open(INPUT,"<Test.txt");
> open(OUTPUT,">new.txt");
> $temp = \/user\/gowri\/remote2;
> while ( <INPUT> ) {
> $_ =~ s{\\/user\\/cce\\/g_tool}{$temp};
> print OUTPUT $_;
> }




Well, I can try.

But why don't you help me by sending a few lines of your Test.txt

There are a few things you might want to try first;

 a. place immediately under the #!/usr/bin/perl line

     use strict;
     use warnings;

 b. Change
     $temp = \/user\/gowri\/remote2; to
     my $temp = "\/user\/gowri\/remote2";

 (Note the inverted commas around the variable)

Now have another go
-- 



Owen


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to