open (FILE, $lfilename) or &dienice; my $hash; my $line; my %hash; my @products; while ( ) { if ( /^Begin Product (.*)/i ) { my %hash; $hash{ 'name' } = $1; $hash{ 'description' } = ; $hash{ 'numberline1' } = ; $hash{ 'numberline2' } = ; my $track = ; $hash{ 'tracking' } = ( $track =~ /(Yes|No)/i ); $hash{ 'images' } = ; $hash{ 'producttext' } = ; my $line = ; last if ( $line ~= /End Product/ ); ##i'm getting a syntax error on this line: line 27, near "$line ~". if i take out the line, i get: Can't use an undefined value as a HASH reference at c:\PROGRA~1\APACHE~1\APACHE\CGI-BIN\GETPRO~2.CGI line 31, line 2134. push @products, \%hash; }} print "", my $ref->{name}, "";