in reply to Problems reading records from file

Can you suggest me some suitable code
Sure:
open FILE, '<', 'san.txt' or die "Cannot open 'san.txt' $!"; my $incr = -1; my @array; while ( <FILE> ) { chomp; next if /^\s*(?:#|$)/; $incr++ if /^ITEM NO:/; push @{ $array[ $incr ] }, $_; } test2::REQUEST( @array );