View Single Post
Old 08-02-2012, 01:40 PM  
u-Bob
there's no $$$ in porn
 
u-Bob's Avatar
 
Industry Role:
Join Date: Jul 2005
Location: icq: 195./568.-230 (btw: not getting offline msgs)
Posts: 33,063
ugly, but it'll work... and less memory intensive than splitting the file:
Code:
open(FILE, 'stuff.txt');
$h3 = 0;
while(<FILE>)
{
  chomp;
  if($_ =~ "<h3>"){$h3++; if($h3 > 1){close FILE;} }
  else{print "$_\n";}
  
}
close FILE;
u-Bob is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote