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