Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: no output or error received

by marto (Chancellor)
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:


Comment on Re: no output or error received
Select or Download Code
Re^2: no output or error received
by Loops (Hermit) 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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2014-08-22 13:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (157 votes), past polls