At 02:44 PM 10/27/02 -1000, Joshua Hoblitt wrote:
--
use strict;
sub myfunc {
wantarray ? [1, 2] : 3;
}
my( $one, $two ) = @{ &myfunc };
print "$one, $two\n";
--
One would expect that to work but the context is getting lost.
That's exactly the problem: the @{} is forcing scalar contex
Liz,
I just saw your thread on p5p about this.
Consider this...
--
use strict;
sub myfunc {
wantarray ? [1, 2] : 3;
}
my( $one, $two ) = @{ &myfunc };
print "$one, $two\n";
--
One would expect that to work but the context is getting lost.
-J
--
"Suppose you were an idiot. And supp
my( $one, $two ) = @{ ($q->dequeue_dontwait)[0] };
works.
line 104: while ( my( $host, $ret ) = @{ ($q->dequeue_dontwait)[0] } ) {
throws:
thread failed to start: Can't use an undefined value as an ARRAY reference at
lib/PolycomStatus.pm line 104
I'd be happy to share the whole module with y
At 10:41 AM 10/27/02 -1000, Joshua Hoblitt wrote:
> my( $one, $two ) = @{ ($q->dequeue_dontwait)[0] };
This is causing a compile error for me. I tried just [] as well.
[Sun Oct 27 10:31:57 2002] PolycomStatus.pm: syntax error at
PolycomStatus.pm line 104, near "->dequeue_dontwait["
[Sun Oct 27
> my( $one, $two ) = @{ ($q->dequeue_dontwait)[0] };
This is causing a compile error for me. I tried just [] as well.
[Sun Oct 27 10:31:57 2002] PolycomStatus.pm: syntax error at PolycomStatus.pm line
104, near "->dequeue_dontwait["
[Sun Oct 27 10:31:57 2002] PolycomStatus.pm: PolycomStatus.pm
At 01:43 PM 10/27/02 +0200, Elizabeth Mattijsen wrote:
At 06:01 PM 10/26/02 -1000, Joshua Hoblitt wrote:
I was wondering why:
--
my( $one, $two ) = @{ $q->dequeue_dontwait };
print "$one, $two\n";
Try:
my( $one, $two ) = @{ ($q->dequeue_dontwait)[0] };
The @{ } forces scalar context within t
At 06:01 PM 10/26/02 -1000, Joshua Hoblitt wrote:
I was wondering why:
--
my( $one, $two ) = @{ $q->dequeue_dontwait };
print "$one, $two\n";
--
Doesn't work but:
--
my( $list ) = $q->dequeue_dontwait;
my( $one, $two ) = @{ $list };
print "$one, $two\n";
--
Does?
Actually, I have no idea. I've