Updated: Code
open (F,$r) || die "Couldnt open $! $r"; $r =~ s/\./1\./; #@Data = <F>; $store = "<Head>"; foreach (@Data){ if (/.*<B>/ && ! /Last modified/){ #If line is a title $temp = $_; $_=~ s/(<[^<>]+>)+//g; chomp; if (/\(/){ $store = $_; $DB{$store} = $temp; }else{ $store = $_; $DB{$store} = $temp; } }else{ #Not a title ($store ne "<Head>")? $DB{$store}:$head .= $_; } }
In reply to Reading from large files by zer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |