Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Can't open file using Perl as CGI

by jonnyfolk (Vicar)
on May 20, 2008 at 06:56 UTC ( #687527=note: print w/ replies, xml ) Need Help??


in reply to Can't open file using Perl as CGI

By the way, I note that you are adding a line break to your print statement without using chomp; This will give you more line breaks than you (possibly) intended...

open (INFILE, '<', 'textfile.txt'); while (<INFILE>) { chomp; print "$_\n"; } close (INFILE);


Comment on Re: Can't open file using Perl as CGI
Select or Download Code
Re^2: Can't open file using Perl as CGI
by Anonymous Monk on May 20, 2008 at 09:14 UTC
    True!
    This "extra line break" was a result/remainder of some troubleshooting earlier that evening. :)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2015-07-04 16:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls