G'day rocketperl,

"But iam not getting any errors or output with this."

That's not overly surprising as you've turned off all warnings with:

no warnings "all";

Also, you haven't used strict (which would have provided some output) and you're not checking whether you're IO is working. I'd recommend you start your script like this:

#!/usr/bin/perl use strict; use warnings;

Next take a look at open. See how the two examples at the start of the page end in:

... or die "cannot open ...: $!";

This gives feedback if there were problems opening the file. Also note the 3-argument form with my $fh which is preferable to the 2-argument form you're currently using. An alternative to hand-crafting these messages for each open is to use autodie.

Once you make these changes to your code, you'll get some feedback. You may be able to fix the problems yourself. If you don't understand the messages, you can get more verbose output with diagnostics.

If, after all that, you're still stuck, post again with the output you get and I'm sure someone will be able to help.

-- Ken


In reply to Re: no output or error received by kcott
in thread no output or error received by rocketperl

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.