ok so i didnt know who else to ask this question to... and it doesent really have to 
do with cgi or anything im just wondering
say you have some code:

sub read_input {
 my ($buffer, @pairs, $pair, $name, $value, %FORM);
 
 $ENV{'REQUEST_METHOD'} =~ tr/a-z/A-Z/;
 if ($ENV{'REQUEST_METHOD'} eq "POST") {
  read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
 } else {
  $buffer = $ENV{'QUERY_STRING'};
 }
 @pairs = split(/&/, $buffer);
 foreach $pair (@pairs) {
  ($name, $value) = split(/=/, $pair);
  $value =~ tr/+/ /;
  $value =~ s/%(..)/pack("C", hex($1))/eg;
  $FORM{$name} = $value;
 }
%FORM;
}

%fromweb = &read_input;

now i was wondering in that code, if you 'use strict;' then then it crashes... saying 
the packages are not found or something.... but if you dont use strict; then it 
works....
so my question is, is the %fromweb hash lexical to the file... or is it put in the 
$main::main::fromweb, or whatever...?? 

if anyone could clear me up on this manner that would be awsome

nate

Reply via email to