[EMAIL PROTECTED] wrote:
Here is my entire code. I need help in getting the in place editor working b/c from my reading this is correct!

## Set pragmas

        use strict;
        use diagnostics;
        use MIME::Lite; 
        use Net::FTP;

Only all lowercase modules are pragmas, the rest are just modules.


####################################################################
## Create date strings so program can look in scratch tape list   ##
## for today and today -1. Refer to localtime for details.        ##    
####################################################################

        sub date_manip {

                my ($month, $day, $year) = (localtime)[4,3,5];
                sprintf ("%02d/%02d/%02d\n", $month+1,$day,($year % 100));
        }

my $dm = &date_manip;

        sub date_manip1 {

                my $days = (shift);
                my ($d, $m, $y) = (localtime($time - $days * 86400)) [3..5];
                sprintf ("%02d/%02d/%02d", $m+1,$d,($y % 100));
        }

my $dmm = &date_manip1(1);

chomp $dm;
chomp $dmm;

date_manip1( 0 ) does the same thing as date_manip() so why two subs? Why add the newline in date_manip() just to remove it a few lines later?


It looks like most, if not all, of the code in the subs EDM, DOMINO, LVIMAGE_L, LVIMAGE_K, LVIMAGE_JI, LVIMAGE_GH, LVIMAGE_FE and LVIMAGE_DC is exactly the same. You should be able to factor out all the common code into a single subroutine which will make your (and future maintainers) job a lot easier.

As to your problem with using $^I, have you tried just opening and reading from the files without using $^I and @ARGV?

N.B.  You shouldn't post sensitive data that the world can see.


John -- use Perl; program fulfillment

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




  • $^ I DBSMITH
    • John W. Krahn

Reply via email to