我在 perl 脚本中使用 Redis.pm 并尝试执行下一个命令:
zrevrangebyscore <key> <highscore> 0 WITHSCORES LIMIT 0 1
在带有 redis 文档的设备中,我接下来编写它,它工作正常
my $data = { $redis->zrevrangebyscore($rkey, $ipl, 0, 'WITHSCORES') };
但是当我尝试在 perl 命令中替换“限制...”时:
my $data = { $redis->zrevrangebyscore($rkey, $ipl, 0, 'WITHSCORES','LIMIT 0 1') };
我有错误
[zrevrangebyscore] ERR syntax error, at /usr/local/lib/perl5/site_perl/5.14/Redis.pm line 163
Redis::__ANON__(undef, 'ERR syntax error') called at /usr/local/lib/perl5/site_perl/5.14/Redis.pm line 195
Redis::wait_one_response('Redis=HASH(0x801075300)') called at /usr/local/lib/perl5/site_perl/5.14/Redis.pm line 183
Redis::wait_all_responses('Redis=HASH(0x801075300)') called at /usr/local/lib/perl5/site_perl/5.14/Redis.pm line 172
我如何在 Redis.pm 中传递给 arg 'LIMIT 0 1' ?