in reply to Use of Typeglob

#!/usr/bin/perl -w use strict; local *FILE; open( FILE, ">log.txt" ) or die "Unable to open log!\n$!\n"; sub print_log { my $fh = shift; my $message = shift; print $fh $message; } &print_log( *FILE, "Hello!\n" ); print FILE "All done!\n"; close FILE or die "Unable to properly close log!\n$!\n";
This is just an example way to use it. I personally don't use them much, but it has come in handy, especially with formats.