Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: no output or error received

by kcott (Chancellor)
on Jun 28, 2013 at 09:58 UTC ( #1041206=note: print w/replies, xml ) Need Help??

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!

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (15)
As of 2018-11-21 16:00 GMT
Find Nodes?
    Voting Booth?
    My code is most likely broken because:

    Results (244 votes). Check out past polls.