[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Text -> HTML



> If you read your files line by line, you could try something
> like this (maybe not the most elegant way ...):
> 
>   $flag=0;
>   while(<FILE>) {

      last if $flag;  # if you only need the first line

>     chop;
>     if($flag == 0) {
>       ($a,$b) = /^(.*?)\s{2,}(.*?)$/;
>       $flag=1;
>     }
>   }
>   print "$a\n$b\n";
> 

Kris,