in reply to Ideal way to pass a file to a module
Why not go for all of these?
sub add_cr { my %source= @_; my $content; # I suppose eventually that's what you want if( $source{content} { # content is in $source{content} } elsif( my $content_ref= $source{ref}) { # content in $$content_ref } elsif( my $filename= $source{filename}) { # you get the idea?...
Pass a hash <type of source> => <data> to the function, and get the real data based on the type of source.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Ideal way to pass a file to a module
by simonm (Vicar) on Apr 12, 2004 at 19:51 UTC |