Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: no output or error received

by kcott (Abbot)
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


Comment on Re: no output or error received
Select or Download Code
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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (12)
As of 2014-12-18 21:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (66 votes), past polls