Help for this page

Select Code to Download


  1. or download this
    my $html = `echo $plaintext | txt2html --extract`;
    # -- or --
    my $html = qx(echo $plaintext | txt2html --extract);
    # where the ()s can be any seperator you can use on qw(), etc.
    
  2. or download this
    use IPC::Open2;
    
    ...
    my $html = do { local $/; <$read_fh> };
    # or you can use a while(<$read_fh>) { ... } loop.
    waitpid $pid, 0; # don't leave "zombies"