Help for this page

Select Code to Download


  1. or download this
    open FILE, "<", "$hostfile" || die "Cannot open $hostfile $!";
    
  2. or download this
    open( FILE, "<", $hostfile ) || die "Cannot open $hostfile $!";
    
  3. or download this
    open FILE, "<", $hostfile or die "Cannot open $hostfile $!";
    
  4. or download this
    while (<FILE>) {
        chomp;
        my ($key, $value) = split (" ", $_);
        $hosts{$key} = $hosts{$value};
        }
    
  5. or download this
    while (<FILE>) {
        my ($key, $value) = split;
        $hosts{$key} = $value;
        }
    
  6. or download this
    while (<FILE>) {
        my ($key, @values) = split;
        push @{$hosts{$key}} = @values;
        }