Two questions:
First, the easy one... In the following, what looks better to you for subroutine names?
our @EXPORT = qw(linux_add_account sun_add_account hp_add_account aix_add_account);
OR
our @EXPORT = qw(LINUXAddAccount SUNAddAccount HPAddAccount AIXAddAccount);
Question 2:
I have subroutines (see above) that have OS type in them. I use another subroutine to get os type ( my $foo=get_os_type($server); ), and then I call the subroutine (at this point) like so &$varAddAccount. I cannot use strict subs and do this, but that is not an option here. I want to use strict, but do not know how to call the subroutine based on what is in var, without having a bunch of if statements all over the place (or switch). Any ideas? I call many different subroutines based on os type, all over the place (e.g., SUNAddUser, SUNDelUser, SUNGetStatus...).
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.