Help for this page

Select Code to Download


  1. or download this
    my @string;
    
    ...
    }
    
      print $string[4],$/;
    
  2. or download this
    open(SYSLOG, "/tmp/log100lines") or die "Can't open file: $!\n";
    
    ...
            my @string = split(/ /, $line);  ## remove the function join
            print "$string[4]\n";
    }
    
  3. or download this
    open my $fh, '<', "file_to_open" or die "can't open file: $!";
    
  4. or download this
    while(<$fh>){
     ...
    }