Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Sys::Syslog no output

by McDarren (Abbot)
on Jan 23, 2006 at 17:55 UTC ( [id://524992]=note: print w/replies, xml ) Need Help??


in reply to Sys::Syslog no output

The line:
if (@return > 1)
is evaluating @return in scalar context. And because your $cmd returns just a single line, you are effectively saying:
if (1 >1)
of course, 1 will never be greater than 1, so you get no output :p
Change it to:
if (@return) {

Cheers,
Darren :)

Replies are listed 'Best First'.
Re^2: Sys::Syslog no output
by sunadmn (Curate) on Jan 23, 2006 at 18:15 UTC
    Ahhh thank you a million times over that did the trick.
    SUNADMN
    USE PERL

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://524992]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-24 01:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found