in reply to How to select a file handle depending on user options
One way of doing it would be:
use IO::File; my $handle = $FILE ? do { IO::File->new($FILE) or fatal_error(".."); } : *STDIN; # later you can use <$handle>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to select a file handle depending on user options
by gg48gg (Sexton) on Jun 20, 2012 at 13:32 UTC |