Hi,

First of all are you sure that the program didn't give any compilation
errors??

>
>my stps="/usr/local/log/scratchtps";
>

I think that's a typo. It should be $stps

The code that you have given, is it complete??

Coz you are saying 'use strict' and without "my"ing you are using $logf,
$irmt and $scratchtps (and many more)

>   open (TP, ">$stps") || die "could not open file:$!";
>        open (TP2, ">$irmt ") || die "could not open file:$!";
>        open (D, "$logf") || die "could not open file:$!";
>        ($^I, @ARGV) = ('.bak', $scratchtps);
>

So I don't think that the problem is with the $INPLACE_EDIT ($^I)
variable.

With Best regards,
R. Kamal Raj Guptha.
Ph: 91-80-28411990 Ext:1296
Mobile - 9880351218


>-----Original Message-----
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>Sent: Thursday, September 16, 2004 4:43 AM
>To: [EMAIL PROTECTED]
>Subject: $ ^ I in place editor
>
>
>All,
>
>In my code I am not understanding why my in place edit does
>not work? Here
>is my code:
>please help!
>
>thanks,
>
>
>use strict;
>use diagnostics;
>use warnings;
>
>my stps="/usr/local/log/scratchtps";
>
>   open (TP, ">$stps") || die "could not open file:$!";
>        open (TP2, ">$irmt ") || die "could not open file:$!";
>        open (D, "$logf") || die "could not open file:$!";
>        ($^I, @ARGV) = ('.bak', $scratchtps);
>
>         print TP "\n";
>         print TP "Print Date: $dm\n";
>         print TP "EDM Scratch Tapes. Please have these returned from
>IronMt.\n";
>         print TP "- - - - - - - - - - - - - - - - - - - - - -
>- - - - - -
>- -\n";
>
>         while (<D>) {
>
>                ## look for 9840S and ebexpire
>                ## declare OFS = tab
>                ## tell split to split on IRS 0,1&5.
>
>                if ( (($_ =~ /9840S/) && ($_ =~ /ebexpire,
>ebexpire/)) &&
>(($_ =~ $dm) || ($_ =~ $dmm)) ) {
>                        local $, = "\t";
>                        print TP +(split)[0,1,5], $/ ;
>                        print TP2 +(split)[5], $/ ;
>                        system ("sort -k3 $stps > $scratchtps");
>                        system ("sort -k3 $irmt > $IRMTscratchtps");
>                }
>        }
>        close (TP);
>        close (TP2);
>        close (D);
>
>Derek B. Smith
>OhioHealth IT
>UNIX / TSM / EDM Teams
>614-566-4145
>


Confidentiality Notice

The information contained in this electronic message and any attachments to this 
message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged 
information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to