# # If you wish httpd to run as a different user or group, you must run # httpd as root initially and it will switch. # # User/Group: The name (or #number) of the user/group to run httpd as. # . On SCO (ODT 3) use "User nouser" and "Group nogroup". # . On HPUX you may not be able to use shared memory as nobody, and the # suggested workaround is to create a user www and use that user. # NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET) # when the value of (unsigned)Group is above 60000; # don't use Group nobody on these systems! # User nobody Group nobody
if (!$data) { print "OK" } # if no data print OK unless ($data) { print "OK" } # unless data (exists) print OK $data or print "OK" # data (exists) or OK print "OK" if !$data # OK if no data print "OK" unless $data # OK unless data (exists)
...とこれだけでは何なので。 上記の例だと読み出しだけなので実害はないでしょうけど、変数の値を書き換えるような場合にバグに悩まされることがあるので my 使っておいた方が良いです。
あと、ファイルハンドルは my CHOBITS; とかできないので、これも local *CHOBITS; のようにして宣言するか、use FileHandle; my $chi = new FileHandle; のようにすると良いです。ただし、local *CHOBITS; という宣言によって CHOBITS という名前を持つ全ての変数が local 宣言された扱いになりますから、@CHOBITS とかいう変数を使っていたりするとハマります。
<SCRIPT LANGUAGE="JavaScript"> <!-- function autoclear() { if (self.document.iform) { if (self.document.cmode && self.document.cmode.autoclear) { if (self.document.cmode.autoclear.checked) {
tr/ //d; s{\G([\x00-\x7f] | # ASCII or JIS X0201 Roman \x8e[\xa0-\xdf] | # JIS X 0201 Katakana \x8f[\xa1-\xfe]{2} | # JIS X 0212 [\xa1-\xfe]{2}) # JIS X 0208 }{($1 eq "\xA1\xA1")? "": $1}egx;
>Variable "%form" is not imported at * 「変数%formがインポートされとらんぞゴルァ」 これは、変数%formが他のモジュールからインポートされていないにもかかわらず アクセスしようとした、ということだと思います。 (って、そのままやな。これ、見たこと無いし.....俺)
>Global symbol "$hDb" requires explicit package name at * 「グローバルシンボル$hDbのパッケージ名をちゃんと指定せんかゴルァ」 これは、変数$hDbがuse strict vars を指定しているにもかかわらず、myで宣言されていないか、 パッケージ名をきちんと指定していないためにエラーを報告しているわけですから、 (少々くどいですが) ○きちんとその変数をmyで宣言して、レキシカルスコープにしているか ○パッケージ名をちゃんと指定しているか($main::hDb とか $a::b::cとか) をそれぞれについて確認してみることをお勧めします。