> > <table border="0" width="100%" height="5%"> > > How can I replace everything after that particular line with > a custom block of text? Thanks. > Maybe using tell() and truncate() on the file?, then an inline edit/insert.
---------------------------------- $file = 'yourfile'; open (FH, "+< $file") or die "can't edit $file: $!"; while ( <FH> ) { $pos = tell(FH) if $_ =~ /table border/; # your regex here } truncate(FH, $pos + 1) or die "can't truncate $file: $!"; ----- # then figure out how to insert your new text block. ask again if you # have trouble -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>