Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

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 "./abcd.pl > file.log some print output is there while some is not there... anyone kindly help?

Comment on perl script not giving output
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

    $ ./abcd.pl > 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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (9)
As of 2014-12-21 23:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (109 votes), past polls