in reply to Backreference assignment clears array

The assignment to $1, a read-only variable, is a fatal error. Your script will not run past that point. (try putting $1=""; right after your shebang line and see what you get).

Based on your other post, this is also a cgi script.

The error "Modification of a read-only value attempted at ..." is no doubt appearing in the error log of your web server -- this is where STDERR is directed for cgi applications. Always check that log when developing web applications!

Matt

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.