Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: File Input and Output

by Anonymous Monk
on Dec 25, 2001 at 05:18 UTC ( #134256=note: print w/replies, xml ) Need Help??


in reply to File Input and Output

This is what was on the web page for the first example: while(&ltFILE&gt){ #reads line by line from FILE w +hich is the filehandle for data.txt

Replies are listed 'Best First'.
Re: Re: File Input and Output
by Anonymous Monk on Aug 26, 2003 at 09:31 UTC
    Hi, I have just started working on PERL and am facing this problem. Is the implementation done like this? i have a text file sample.txt which has 3 lines abc deg hij when i read everything once i get all the details and then am not able 2 read it again. code used is open(file1,"sample.txt"); print(<file1>); $line1=<file>; print($line1); This does not print anything. Can u pls suggest?Have I done some mistake? Thanks KP

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://134256]
help
Chatterbox?
[karlgoethebier]: ...pasta bolded too soft in Eately?
[karlgoethebier]: BOILED!
[karlgoethebier]: OK, at least a cool song: https://www. youtube.com/watch? v=jU4caMqKssg

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2017-10-21 15:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (270 votes). Check out past polls.

    Notices?