Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: no output or error received

by marto (Bishop)
on Jun 28, 2013 at 09:49 UTC ( #1041203=note: print w/replies, xml ) Need Help??

in reply to no output or error received

Hardly surprising. You have:

no warnings "all";

See warnings. You don't check that you're opening files successfully , see open, check $!. To write to your file use:

print OFILE "$name\n";

Try adding:

use strict; use warnings;

Declare your variables, change how you're using open as per the documentation. It looks like you could benifit from learning the basics:

Replies are listed 'Best First'.
Re^2: no output or error received
by Loops (Curate) on Jun 28, 2013 at 09:55 UTC

    Just to be a little more explicit, you don't want to reopen the file every iteration of your loop. There's no reason to reopen it each time you're about to print. So open it before you start reading the input and writing it out.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1041203]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2018-02-17 20:29 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (249 votes). Check out past polls.