Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: how read data from file

by PetreAdi (Sexton)
on Jan 18, 2014 at 12:44 UTC ( [id://1071099]=note: print w/replies, xml ) Need Help??


in reply to how read data from file

Try this

$filename1="file.txt"; open (DAT, "<$filename1")|| die("Cannot Open File"); @MYFILE = <DAT>; close (DAT); foreach $t (@MYFILE) { $char = substr($t, 0, 2); if (length $t>1) {print "\n $char";} }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2026-02-17 03:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.