I have the following subroutine that I have to pass the subroutine as a hash table, and this hash table should be called again inside another subroutine using perl?
input file (from linux bdata command):
NAME PEND RUN SUSP JLIM JLIMR RATE HAPPY achandra 0 48 0 2000 50:2000 151217 100% agutta 1 5 0 100 50:100 16561 83%
My routine:
sub g_usrs_data() { my($lines) = @_; my $header_found = 0; my @headers = (); my $row_count = 0; my %table_data = (); my %row_data = (); $lines='bdata';
My request:
How can I pass my subroutine as a hash to another subroutine?
example: g_usrs_data () -> this is my routine.
the above routine must be passed to another routine (i.e. in usrs_hash as a hash table)
example: create_db (usrs_hash, $ sql1m)
user7341243
source share