I have a text file, and a function to retrieve from that text file:
@thefile = read_file( 'somepathfile' );
I would like to have a different implementation of the read_file function depending on which type is receiving the information.
So if I write:
%thefile = read_file( 'somepathfile' );
then a different function will be executed.
How do I do that?
Have a look at
WantorContextual::ReturnCPAN modules.Below is a simple example using
Want:NB. The hash dereference is needed to force the return context.
/I3az/