e dot dot dot
a mostly about the Internet blog by

January 2006
Sun Mon Tue Wed Thu Fri Sat
       


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.

File name: stdout_redir.pl
File size: 746 bytes
Downloads: 26
 
I use and/or have created these programs/scripts/files myself.
Nothing I've created contains malicious code, and to the best of my knowledge, other files contain no malicious code as well.
Even so, I take no responsibility whatsoever for any problems resulting from their use.


posted at: 11:23am on 07-Jan-2006
path: /Downloads | permalink | edit (requires password)

0 comments, click here to add the first



January 2006
Sun Mon Tue Wed Thu Fri Sat
       







RSS (site)  RSS (path)

ATOM (site)  ATOM (path)

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  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)
 -2011  February  (7)


My Sites

 - Millennium3Publishing.com

 - SponsorWorks.net

 - ListBug.com

 - TextEx.net

 - FindAdsHere.com

 - VisitLater.com