Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Reading in a file not recognizing lines

by bradcathey (Prior)
on May 21, 2006 at 23:14 UTC ( [id://550836]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    open (FILE, "somefile.txt") or die;
    my @records = <FILE>;
    close(FILE);
    
  2. or download this
    my @records;
    open (FILE, "somefile.txt") or die;
    ...
       push @records, $_;
    }
    close(FILE);
    
  3. or download this
    my @records = split(/\r/,$records);
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://550836]
Approved by GrandFather
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2024-03-28 11:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found