in reply to About "thread failed to start:"

Why are you using two backslashes?

my $thr0 = threads->new(\\&scan, "$net@ip[0..63]", $port); # ^^

Remove one of them and you'll at least get past the "Not a CODE reference" error.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I'm with torvalds on this
In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked

Replies are listed 'Best First'.
Re^2: About "thread failed to start:"
by hxbsy (Novice) on Apr 09, 2015 at 08:10 UTC

    thx
    I'm a beginner of Perl.I made a low mistake

      So -- how is it working now?

      Just so you know, you generally double the backslashes when they are inside quotation marks and not double them otherwise.