if ( /^Query\s+(\d+)\s+/ ) { $query = $1; $offset = $+[ 0 ]; my $top = substr $_, $offset;#substring the first 15 char my $pipes = substr , $offset; #same,if the Sbjct is more than 5 numbers then this doesnt worx my $subject = ; my($value) = $subject =~ /^Sbjct\s+(\d+)/; my $bot = substr $subject, $offset;#if the Sbjct is more than 5 numbers then this doesnt work