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

@arrays and more

Thread Next
From:
Carlo Sayegh
Date:
February 25, 2002 13:50
Subject:
@arrays and more
Message ID:
3C7AAD23.3436660C@anim.dreamworks.com
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.

Thanks,

-C

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

while (<>) {
        if ( (/^DONE/) ) {
                last;
        }
}

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

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

while (<>) {
        if ( (/^DONE/) ) {
                last;
        }
}

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



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




Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About