Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Split function

by Anonymous Monk
on Dec 03, 2012 at 11:40 UTC ( #1006856=note: print w/replies, xml ) Need Help??


in reply to Split function

split should die if it finds the pipe and it should process if it finds comma or tab delimited.

No, split shouldn't/won't die, that is now how it works

If you want your program to die on pipe, use the match operator and match a pipe, examples in perlintro, read it

Replies are listed 'Best First'.
Re^2: Split function
by rjt (Deacon) on Dec 03, 2012 at 12:11 UTC

    Perhaps there's a bit of a language issue here, but I'm pretty sure the OP meant that the processing should work if split found four comma or space delimited columns, and die otherwise, not that split itself should raise an exception, even though it may have literally read that way.

    See my reply, below. I know it might not exactly hit the mark, as the specification was a little vague, but it should be easy to modify for different inputs or failure conditions.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1006856]
help
Chatterbox?
[james28909]: what if one day we are able to grab the curtain that is "spacetime" and pull it back to reveal <insert imagination here> pulling at levers and ropes xD
[holli]: like dorothy?
[james28909]: see ya later holli
[james28909]: yeah like wizard of oz lol. its just a joke though
[james28909]: i cannot understand how someone cant see that a cloud of gas that evolves into a solar system or galaxies. it just makes sense to me. everythign that has happened, had to have happened for anything on this planet to be.
[james28909]: /gas/gas and debris/
[james28909]: another thing, i used to be atheist. life experiences, personal evidence. and my own perception is the reason why i believe the things i do.
[erix]: and now you are agnostic?
[james28909]: arunbear, your picking bits of history to fit your own narrative. right now, humans are smarter than in any of those times.

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (13)
As of 2017-12-15 14:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (433 votes). Check out past polls.

    Notices?