gt; print Dumper $hash_ref;
>
> print <<"EndOfHTML";
>
> name = $name
> hash_ref name = $$hash_ref{name}
>
> EndOfHTML
>
> __END__
>
>
> fried.dat contains:
> $name = "chicken";
>
> {
> name => 'fried'
> }
&g
--- Kyle Babich <[EMAIL PROTECTED]> wrote:
> Still getting the same problem, name requires explicit package name.
>
> #!/usr/bin/perl -wT
> use strict;
> use Data::Dumper;
> use CGI qw( :standard );
>
> print header ( "text/html" );
>
> my $hash_ref = do ( 'fried.dat' ) || die "error: unable t
ins:
$name = "chicken";
{
name => 'fried'
}
> -Original Message-
> From: Kyle Babich [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 03, 2002 11:07 AM
> To: [EMAIL PROTECTED]
> Subject: Re: 2 Questions
>
>
> Still getting the same
EMAIL PROTECTED]>
Cc: "beginners-cgi" <[EMAIL PROTECTED]>
Sent: Wednesday, July 03, 2002 9:25 AM
Subject: RE: 2 Questions
> scoping!!! my only scopes the end of the file!
>
> so my in fried.dat is scoped only in fried.dat.
>
> use our($name);
>
> >
scoping!!! my only scopes the end of the file!
so my in fried.dat is scoped only in fried.dat.
use our($name);
> -Original Message-
> From: Kyle Babich [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 03, 2002 9:19 AM
> To: [EMAIL PROTECTED]
> Cc: beginners-cgi
&
I'm still getting the $name requires explicit package name.
Here is what I have in index.pl
#!/usr/bin/perl -wT
use strict;
use Data::Dumper;
use CGI qw( :standard );
print header ( "text/html" );
my $hash_ref = do ( 'fried.dat' ) || die "error: unable to open
fried.txt\n";
print Dump
--- Kyle Babich <[EMAIL PROTECTED]> wrote:
> How can I import scalars, arrays, etc. from external perl and text
> files?
>
> This is what I have in index.pl:
>
> #!/usr/local/bin/perl -wT
> use strict;
> use CGI qw/ :standard /;
>
> print header ( 'text/html' );
>
> open(TEXT," while() {