Thanks Nicola, it didn't work though I get this error now.
Software error: syntax error at /web/schooled/cgi-bin/optin.cgi line 36, next char ) Execution of /web/schooled/cgi-bin/optin.cgi aborted due to compilation errors. heres the edited code #!/usr/bin/perl use CGI qw( :standard ); use CGI::Carp 'fatalsToBrowser'; print header(); my $file1 = "/web/schooled/www/news/subscribers_news1.txt"; my $file2 = "/web/schooled/www/news/subscribers_news2.txt"; #open and read file1 into hash1, the index being the email address #hash 1 contains the email addresses of those people who have registered #their interest in receving the newsletter but not yet confirmed #data is stored in file 1 emailaddress|format|date\n open IN, "<$file1" or die("Cannot Open: $!"); while( my $record = <IN> ){ chomp $record; @data = split( /\|/, $record); $subscribers1{$data[0]} = $data[1]; } close IN; -----Original Message----- From: Nikola Janceski [mailto:nikola_janceski@;summithq.com] Sent: Thursday, November 07, 2002 08:20 To: Johnstone, Colin; '[EMAIL PROTECTED]' Subject: RE: die not working add this: use CGI::Carp 'fatalsToBrowser'; > -----Original Message----- > From: Johnstone, Colin [mailto:Colin.Johnstone@;det.nsw.edu.au] > Sent: Wednesday, November 06, 2002 4:18 PM > To: '[EMAIL PROTECTED]' > Subject: die not working > > > Gidday all, > > I assume when using die in this format I should see the error message. > > #!/usr/bin/perl > > use CGI qw( :standard ); > > print header(); > $file1 = /web/schooled/www/news/subscribers_news1.txt > > open IN, "<$file1" or die("Cannot Open: $!"); > while( my $record = <IN> ){ > chomp $record; > @data = split( /\|/, $record); > $subscribers1{$data[0]} = $data[1]; > } > close IN; > > The program dies but no error prints on the screen. > > Where am I going wrong? > > Colin Johnstone > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > ---------------------------------------------------------------------------- -------------------- The views and opinions expressed in this email message are the sender's own, and do not necessarily represent the views and opinions of Summit Systems Inc. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]