Help for this page

Select Code to Download


  1. or download this
    # wrong
    while (my $line = $fh){
    
    # right
    while (my $line = <$fh >){
    
  2. or download this
    open (my $fh, "<", "test.txt");
    my @file_array = (<$fh>);
    print @file_array,"\n";
    
  3. or download this
    #!/usr/bin/perl
    use warnings;
    ...
    }
    
    print "@results\n";