e dot dot dot
a mostly about the Internet blog by

home << Downloads << perl stdout capture

February 2012
Sun Mon Tue Wed Thu Fri Sat
     
     

Sat, 07 Jan 2006


Amazing Perl output capturing `sniplet`

Here's a terrific little chunk of code I found while searching for a way to capture some output from a Perl script, the output of which was being used in a Server-Side-Include.

I wanted the ability to use the same script, capture the output into a variable, then "escape" the output for use as a javascript feed.

It works like a charm. All output going to STDOUT is captured into a variable without requiring any modification to your original subroutine.

You're then able to do some work on it before PRINTing it to the restored STDOUT.
Try it for yourself.


posted at: 11:23am on 07-Jan-2006
path: /Downloads | permalink


0 writeback(s)

comment...

 
Name:
URL/Email: (optional)
[http://... or mailto:you@wherever]
Title: (optional)
Comments:
Please enter the anti-spam code shown below: 

home << Downloads << perl stdout capture

February 2012
Sun Mon Tue Wed Thu Fri Sat
     
     


Categories
 - blog home

 - Announcements  (2)
 - Annoyances  (0)
 - Domains  (0)
 - Downloads  (4)
 - Ecommerce  (440)
 - Fitness  (0)
 - Home_and_Garden  (0)
     - Cooking  (0)
     - Tools  (0)
 - Humor  (1)
 - Notices  (1)
 - Observations  (2)
 - Oddities  (2)
 - Online_Marketing  (391)
     - Affiliates  (1)
     - Merchants  (0)
 - Programming  (0)
     - Browsers  (1)
     - DHTML  (0)
     - Javascript  (536)
     - PHP  (0)
     - PayPal  (1)
     - Perl  (38)
          - blosxom  (0)
     - Unidata_Universe  (0)
 - Random_Advice  (1)
 - Reading  (0)
     - Books  (0)
     - Ebooks  (1)
     - Magazines  (0)
     - Online_Articles  (4)
 - Resume_or_CV  (1)
 - Reviews  (1)
 - Rhode_Island_USA  (0)
     - Providence  (1)
 - Shop  (0)
 - Sports  (0)
     - Football  (1)
          - Cowboys  (0)
          - Patriots  (0)
     - Futbol  (1)
          - The_Rest  (0)
          - USA  (1)


Archives
 -2012  February  (1)
 -2012  January  (2)
 -2011  December  (1)
 -2011  November  (1)
 -2011  October  (1)
 -2011  September  (3)
 -2011  August  (2)
 -2011  July  (1)
 -2011  June  (3)
 -2011  May  (2)
 -2011  April  (3)
 -2011  March  (7)


My Sites

 - Millennium3Publishing.com

 - SponsorWorks.net

 - ListBug.com

 - TextEx.net

 - FindAdsHere.com

 - VisitLater.com