Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

perl script not giving output

by steadybompipi (Initiate)
on Feb 04, 2008 at 03:56 UTC ( #665894=perlquestion: print w/replies, xml ) Need Help??
steadybompipi has asked for the wisdom of the Perl Monks concerning the following question:

Dear all, I have a perl script which does not produce all the output when i issue the command "./ > file.log some print output is there while some is not there... anyone kindly help?

Replies are listed 'Best First'.
Re: perl script not giving output
by Fletch (Chancellor) on Feb 04, 2008 at 04:00 UTC

    As anyone can obviously see from the ample code you've provided the problem is on line 17. I mean duh.

    (Hint: How (Not) To Ask A Question)

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.

Re: perl script not giving output
by haoess (Curate) on Feb 04, 2008 at 05:59 UTC

    Please note that some shells on some OS' redirect only some output (namely only STDOUT) when using >. Output produced by warn, die et al. is normally not printed to STDOUT, but STDERR. To redirect this output to your logfile (on some shells), you have to

    $ ./ > file.log 2>&1

    -- Frank

      actually did that too... but still some output is not in...
Re: perl script not giving output
by TedPride (Priest) on Feb 04, 2008 at 13:59 UTC
    If your Perl script produces the wrong line endings for your OS, you may end up with the appearance of a single line of output when there are in fact many, especially when using the cat command or similar from the command line. I've run into this before.
      Nope that is not the problem i am having

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://665894]
Approved by naikonta
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2016-10-26 08:20 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (337 votes). Check out past polls.