- or download this
#print $channel "$cmd\n";
#while (<$channel>) {
print {${$channel}} "$cmd\n";
while (<${$channel}>) {
- or download this
#!/usr/bin/perl
...
open ( my $filehandle, ">", "testfile.txt" );
&print_to_fh ( \$filehandle );
close ( $filehandle );
- or download this
sub print_to_fh
{
...
open ( my $filehandle, ">", "testfile.txt" );
&print_to_fh ( \$filehandle );
close ( $filehandle );
- or download this
print {$$ref_to_fh} "Even more stuff\n";