sub count_lines { $lines = 0; open(FILE, $_[0]) || die "Error opening the file!"; while() { $lines += ($_ =~ tr/\n//); } print "
$lines line(s) in [$filepointer].


\n"; close (FILE); } sub breakup_lines { open(FILE, $_[0]) || die "Error opening the file!"; &init_vars; while() { $newlength = 0; $cmax = 0; push @list, (split /\|/); $count++; $length = @list; $newlength = $length - $oldlength; #print "length of line: ",$newlength,"
"; #print "count: ",$count,"
"; $cmax = $length; $oldlength = $length; #print "list array: ",@list; #if ($show{'news'} == 1) { &print_news; #} } close (FILE); } sub init_vars { $count = 0; $next = 0; $dolines = 0; $oldlength = 0; } 1;