in reply to share array of hashes between main program and thread
#!/usr/bin/perl use warnings; use strict; use Data::Dumper; my @array; my $new_array = do_something( @array ); print Dumper \$new_array; sub do_something { my ( $Array_ref ) = shift; push( @{ $Array_ref } , { file => 'test1.zip', price => '10.00', desc => 'the 1st test' } ); return $Array_ref; }
|
|---|