setrhost.pl

Description

Setrhost.pl is a HFPM module that sets given field(s) or environmental variable(s) to the value of the "REMOTE_HOST" environmental variable if available otherwise to the "REMOTE_ADDR" environmental variable.

Usage

setrhost.pl {$field | envvar | %envvar} in the pipeline.

Usage Explanation

The fields and environmental variables are set to the value of the "REMOTE_HOST" or "REMOTE_ADDR" environmental variable. If none are specified, then the environmental variable "rhost" is used as the destination.

A '$' prefix means a field destination and a '%' prefix indicates the destination is an environmental variable, which is the default.

Examples

setrhost.pl $afield %var h
sets the field "afield" and the environmental variables "var" and "h" to the user's host.
setrhost.pl
sets the environmental variable "rhost" to the "REMOTE_HOST" or "REMOTE_ADDR" environmental variable.

Other Notes

The current version number is 1.0.

This module should work on any platform with a perl version 5 and CGI FPI implementation.

This module can be used more than once in the pipeline.


[HFPM Home] [Please comment]
Copyright © by James Hoagland
www.hoagland.org | webmaster@hoagland.org
3 January 1996