Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Splitting the record using the delimiter

by graff (Chancellor)
on Sep 30, 2015 at 23:30 UTC ( [id://1143479]=note: print w/replies, xml ) Need Help??


in reply to Re: Splitting the record using the delimiter
in thread Splitting the record using the delimiter

This is a case for a negative look-behind assertion:
#!/usr/bin/perl use strict; my $id = 'Hi|Hello\|Sir'; my @code = split(/(?<!\\)\|/,$id); print $code[1]."\n";
UPDATE: Sorry, I should have realized that I just repeated what kcott said in the previous reply.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-24 01:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found