Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

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]
[karlgoethebier]: silence after a post is the worst punishment ;-)
[karlgoethebier]: i guess i've been ikegamid, he

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (9)
As of 2017-11-23 17:08 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (336 votes). Check out past polls.