Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Accepting either a filename or a handle

by cchampion (Curate)
on Jun 18, 2004 at 21:12 UTC ( #368068=note: print w/replies, xml ) Need Help??


in reply to Accepting either a filename or a handle

What about named parameters?

sub doit { my %options = @_; if ($options{filename} ) { #use a filename } elsif ( $options{filehandle} ) { # use a filehandle } else { die "won't work"; } } doit( filename => 'somefile'); doit( filehandle => $fh );

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://368068]
help
Chatterbox?
[stevieb]: Playing around with two DACs to control a single RGB LED (each DAC only has two outputs, LED has 3 inputs), and have realized that each of my IC RPi dists needs a wiring diagram, which is linked to within the documentation

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2017-08-20 19:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (317 votes). Check out past polls.

    Notices?