469,898 Members | 1,779 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,898 developers. It's quick & easy.

Tie a file handle to a variable

Hi
how can I tie a file handle to a variable (probably tie is not
the right perl terminology in this case)? Basically I want that
everything that is written to a file is copied into a variable as
well. Of course I could read the file again, something like

while (<FH>){
....
}

but I need to chenge the variable dinamically.
Is it possible somehow?

Thanks
Carlo
Jul 19 '05 #1
1 3065
ca*************@t-mobile.co.uk (Carlo Filippini) wrote in message news:<b0**************************@posting.google. com>...
how can I tie a file handle to a variable (probably tie is not
the right perl terminology in this case)? Basically I want that
everything that is written to a file is copied into a variable as
well.


Sounds like you want IO::Tee and IO::Scalar

Note that as of 5.8 functionality similar to that of IO::Scalar is now
in the Perl core (perldoc -f open).

This newsgroup does not exist (see FAQ). Please do not start threads
here.
Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

22 posts views Thread by Ling Lee | last post: by
9 posts views Thread by Mantorok Redgormor | last post: by
5 posts views Thread by Pete | last post: by
7 posts views Thread by John Dann | last post: by
1 post views Thread by Al G | last post: by
3 posts views Thread by swethak | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.