CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
How to send array to a thread ?

 



amit1987
Novice

Jun 15, 2010, 9:39 PM

Post #1 of 2 (814 views)
How to send array to a thread ? Can't Post

How to send array to a thread function and access it ?
i tried a lot but not able to do so...

also googled a lot ...

any kinda of example is appreciated...


Bianca
User

Jun 15, 2010, 11:20 PM

Post #2 of 2 (811 views)
Re: [amit1987] How to send array to a thread ? [In reply to] Can't Post

Are you searching that?

Code
#!/usr/bin/env perl -W 
use strict;
use warnings;
use diagnostics;

my @arr = (3,5,7);
test (\@arr);

sub test {
foreach (@{$_[0]}) {
print "-> $_\n";
}
}


 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives