I want to call a function, say, "hello", but I want the code smart enough to decide which version of "hello" to execute. What I'd like to do is have code that does something like this:
Is this possible? I guess I'm looking for something like the ifdef functionality is C????
Thanks much!
Code:
use abc;
if ($Windows) {
use Win32;
sub hello {
# Do some Windows specific stuff
}
} else {
use something;
sub hello {
# Do same thing as above, but non-windows specific
}
}
Is this possible? I guess I'm looking for something like the ifdef functionality is C????
Thanks much!