in reply to no output or error received

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

Replies are listed 'Best First'.
Re^2: no output or error received
by rocketperl (Sexton) on Jun 28, 2013 at 10:50 UTC
    Thanks so much. It worked and got my output!