develooper Front page | perl.beginners | Postings from February 2002

@arrays and more

Thread Next
Carlo Sayegh
February 25, 2002 13:50
@arrays and more
Message ID:
Hello All,

I'm trying to do three things in this step.

1.  I can't figuer out how to make this part of the script end
with a new line and then ^D once to end.

2.  How can I get the LOGFILE to read and print "@arrays" into
a filebe.
When I check the ../../../../DRlogs/current file all I see are
the scalar variables.

3. Once the data is copied to the ../../../../DRlogs/current,
how can I get it to update daily and copy yesterdays data into
another file.



        print "\nPlease state below your duties as $function
adminstrator. Press <enter> then<^D> twice when done.\n\n";

while (<>) {
        if ( (/^DONE/) ) {

@data1 = <STDIN>;
chomp (@data1);

        print "\nPlease indicate any other duties performed.
Press <enter> than <^D> twice when done.\n\n";

while (<>) {
        if ( (/^DONE/) ) {

@data2 = <STDIN>;
chomp (@data2);

open (LOGFILE, ">>/../../../../DRlogs/current");
        print LOGFILE "$day\  $username\  $function\  @data1\
close LOGFILE;

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About