#!/usr/pin/perl
 
$file  = "perlintro.html";
$file2 = $file.'.txt';
 
open (MYIN,  "<$file")  || die "Can't open file $file:  $!";
open (MYOUT, ">$file2") || die "Can't write to file $file2: $!";
 
while ($str = <MYIN>)
{ 
  $str =~ s/<[^>]+>//g; 
  print MYOUT $str;  
};
 
close(MYIN);
close(MYOUT);

perl/ex4-1.txt · Последние изменения: 13/03/2010 16:19 — vlasov
CC Attribution-Noncommercial 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0