I tried using the suggestions by chromatic and almut:
#!/usr/bin/perl use strict; use warnings; use File::Copy "cp"; my $confINPUT; my ($i) = 0; my ($date) = &getDate; my ($confOutName) = shift @ARGV; die "$!\n" unless open CONF_ID, '<', "@ARGV"; die "$!\n" unless open CONFLIST1, '>>', 'conf_list1.tmp'; die "$!\n" unless open CONFLIST2, '>>', 'conf_list2.tmp'; die "$!\n" unless open CONFLIST3, '>>', 'conf_list3.tmp'; die "$!\n" unless open CONFADD, '>>', "./additions/additions_$ARGV[0 +]_date"; while ( defined( $_ = <CONF_ID> ) ) { next unless /\S/; die "$!\n" unless open TEMPLATE1, '<', './templates/conf_template' +; die "$!\n" unless open TEMPLATE2, '<', './templates/conf_template2 +'; die "$!\n" unless open TEMPLATE3, '<', './templates/conf_template3 +'; $confINPUT = $_; my ( $confID, $confPIN ) = split( " ", $confINPUT, 3 ); while ( defined( $_ = <TEMPLATE1> ) ) { $_ =~ s/XXXXXX/$confID/g; print CONFLIST1 $_; } while ( defined( $_ = <TEMPLATE2> ) ) { $_ =~ s/XXXXXX/$confID/g; $_ =~ s/AAAA/$confPIN/g; print CONFLIST2 $_; } while ( defined( $_ = <TEMPLATE3> ) ) { $_ =~ s/XXXXXX/$confID/g; print CONFLIST3 $_; } die "$!\n" unless close TEMPLATE1; die "$!\n" unless close TEMPLATE2; die "$!\n" unless close TEMPLATE3; } die "$!\n" unless close CONFLIST1; die "$!\n" unless close CONFLIST2; die "$!\n" unless close CONFLIST3; die "$!\n" unless open CONFLIST1, '<', 'conf_list1.tmp'; die "$!\n" unless open CONFLIST2, '<', 'conf_list2.tmp'; die "$!\n" unless open CONFLIST3, '<', 'conf_list3.tmp'; print CONFADD "; start conference config 1\n"; while ( defined( $_ = <CONFLIST1> ) ) { print CONFADD $_; } print CONFADD "\n\n; start conference config 2\n"; while ( defined( $_ = <CONFLIST2> ) ) { print CONFADD $_; } print CONFADD "\n\n; meetme_additional_custom.conf\n"; while ( defined( $_ = <CONFLIST3> ) ) { print CONFADD $_; } close CONFADD; die "$!\n" unless close CONFLIST1; die "$!\n" unless close CONFLIST2; die "$!\n" unless close CONFLIST3; cp( "$ARGV[0]", "./finished_list/@ARGV.finished" ); unlink "$ARGV[0]"; die "$!\n" unless unlink 'conf_list1.tmp'; die "$!\n" unless unlink 'conf_list2.tmp'; die "$!\n" unless unlink 'conf_list3.tmp'; print "Number of Entries processed: $i\n"; exit 0; sub getDate() { my (@months) = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov De +c); my (@weekDays) = qw(Sun Mon Tue Wed Thu Fri Sat Sun); my ( $second, $minute, $hour, $dayOfMonth, $month, $yearOffset, $dayOfWeek, $dayOfYear, $daylightSavings ) = localtime(); my ($year) = 1900 + $yearOffset; my ($theTime) = "${dayOfMonth}_$months[$month]"; return $theTime; }

In reply to Re: Error Correction by Khen1950fx
in thread Error Correction by PyrexKidd

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.