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

Re: Split function

by Adam (Vicar)
on Feb 07, 2001 at 19:57 UTC ( [id://57056]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Split function

Without the benefit of your code, I can't really tell you where you went wrong.
use strict; my $file; { local $/; $file = <>; } $file =~ s!$/!!g; my @elements = split /\|/, $file;
above code is untested

Update
By the way, there is more info about split in the library. I just noticed this was your first post, and that no one pointed you there, so I thought I would mention it as a reference.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://57056]
help
Sections?
Information?
Find Nodes?
Leftovers?
    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.