Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

RE: using split on a file

by h0mee (Acolyte)
on Feb 15, 2000 at 00:52 UTC ( [id://3474]=note: print w/replies, xml ) Need Help??


in reply to using split on a file

You should also be able to turn off what perl considers a newline by setting
$/ = undef;
Now you can
$string = <FILE>; #since $/ is off, everything #gets slurped into $string @array = split /%%%%\n/m, $string; #now we just split on #the appropriate delimiter, carriage #return included

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2024-04-22 19:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found