Ciprian Morar wrote:
>
> 1. What is the difference between Line #1 and Line #2?
> 2. Why is the Line #2 declaration incorrect?
>
> use strict;
>
> my %option;
> $option {'q'} = new CGI;
>
> #Line 1---------------------
> $option{'Mon'} = 'Monday';
>
> #Line 2 ---------------------
> $option->{'Tue'} = 'Tuesday';
>
> print $option{'q'} -> header(),
> $option{'q'} -> start_html();
>
> print $option{'q'} -> end_html;
1. On line 1 you are assigning a value to a key of the %option hash. On
line 2 you are assigning a value to a key of the anonymous hash
referenced through the $option scalar.
2. You have not declared the scalar $option before using it.
perldoc perlreftut
perldoc perlref
perldoc perldata
perldoc perldsc
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]