projects
/
p5sagit/p5-mst-13.2.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Re: Named-capture regex syntax
[p5sagit/p5-mst-13.2.git]
/
t
/
lib
/
TieOut.pm
1
package TieOut;
2
3
sub TIEHANDLE {
4
my $scalar = '';
5
bless( \$scalar, $_[0]);
6
}
7
8
sub PRINT {
9
my $self = shift;
10
$$self .= join('', @_);
11
}
12
13
sub PRINTF {
14
my $self = shift;
15
my $fmt = shift;
16
$$self .= sprintf $fmt, @_;
17
}
18
19
sub FILENO {}
20
21
sub read {
22
my $self = shift;
23
my $data = $$self;
24
$$self = '';
25
return $data;
26
}
27
28
1;