My script has a number of separate functions and each function needs to be ran from another script. I don't want to put each function into another standalone script which would give me something like eight scripts.
example code:
#!/usr/bin/perl
sub x {
print "hello\n";
}
sub z {
print "next\n";
}
exit (0);
In another unrelated script I want to run function x and in another part of the unrelated script I want to run function z. Is it possible like passing arguments to do something like /scripts/my.pl(x) ?
example code:
#!/usr/bin/perl
sub x {
print "hello\n";
}
sub z {
print "next\n";
}
exit (0);
In another unrelated script I want to run function x and in another part of the unrelated script I want to run function z. Is it possible like passing arguments to do something like /scripts/my.pl(x) ?