reading input from a file

hello...

i made a text file by the name "text.txt" and the contents were
Sidra|38|BE
Hira|48|BE
Shagufta|50|BE

Then i wrote the following script

open(DAT, "text.txt");
$data_file=" text.txt ";
open(DAT, $data_file);
@raw_data=;
close(DAT);
foreach $student (@raw_data)
{
chomp($student);
($name,$roll_no,$class)=split(/\|/,$student)…