#!/usr/bin/local/perl print "Content-Type:text/html\n\n"; open(file,"cpfsk.access"); @project_name=grep { $_ =~ m/^\[/} ; close file; print @project_name; #!/usr/bin/local/perl print "Content-Type:text/html\n\n"; open(INFILE,'<',"cpfsk.access"); while($line=) { chomp; $project_name=grep \[*\],$line; print $project_name; } close(INFILE);