Tie::Handle::Scalar - Perl extension for tieing a scalar to a filehandle.
use Tie::Handle::Scalar; my $file = "This is a test"; tie *FH, 'Tie::Handle::Scalar', \$file; print FH "\nAnother line\n\n\n\n"; while (<FH>) { print; } untie FH;
WARNING - This ONLY works with perl version 5.6.0< or above. This may be due to interfaces to handles in older versions of perl not being complete ;) Tie::Handle::Scalar allows you to tie a scalar to a filehandle. Supported and unsupported/untested methods are listed below. I wrote this before I realised there were 2 other modules that do something similar.... IO::Stringy and IO::String. These two may work better for you. But I couldn't get either of them to work with Net::FTP as they don't appear to support the FILENO method.
And there are a few others I'm sure
Andy Williams (andy.williams@lampsolutions.co.uk)
Please direct any bugs/fixes to the author.
perl(1). IO::Stringy. IO::String
Dave Cross (dave@dave.org.uk) for answering most if not all my questions.
Copyright 2001 Andy Williams. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
4 POD Errors
The following errors were encountered while parsing the POD:
'=item' outside of any '=over'
You forgot a '=back' before '=head1'
To install Tie::Handle::Scalar, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tie::Handle::Scalar
CPAN shell
perl -MCPAN -e shell install Tie::Handle::Scalar
For more information on module installation, please visit the detailed CPAN module installation guide.