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.#!/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";
In reply to Re: Use of Typeglob
by Transient
in thread Use of Typeglob
by murugu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |