Pages: 1
RSS
Perl to RegExp, Converting a Perl Script to Regular Expressions for TB Template
 
As I understand, the TB regular expressions are based on or at least very similar to Perl. So here is my question/problem. I have a simple Perl script that does exactly what I want (although how it does it I do not entirely understand, because I don't know Perl). I want to get the same effect in a TB template. So what should it look like in the template?

Here is the Perl:

----------------------------------
#!/usr/local/bin/perl -w

# jaymail.pl

while(<>) {
  $blank++ if /^$/;

  if ($blank) {
    print;
    next;
  }

  print if /^(From|To|Subject): /;
}
----------------------------------

Please rescue me from this quandary and make my life much, much easier.

--
Avi Yashar
Windows XP Pro with TB Pro 3.0.1.33
--
Avi Yashar
 
Query moved to TBUDL for full answer

See The TBUDL Info page for information about TBUDL and the address of the list archives if you want to see the answers to this query.
iviarck
Pages: 1