January 2006 |
Sun |
Mon |
Tue |
Wed |
Thu |
Fri |
Sat |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
|
|
|
|
|
|
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 | edit (requires password)
January 2006 |
Sun |
Mon |
Tue |
Wed |
Thu |
Fri |
Sat |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
|
|
|
|
|
|