I am splitting the record using the delimiter '|'. Encounter a scenario where pipe symbol(delimiter) is preceded by escape sequence,in that case pipe symbol couldn't be consider as a delimiter. How do i resolve it using split? Posted below the sample piece of code
#!/usr/bin/perl use strict; my $id = 'Hi|Hello\|Sir'; my @code = split(/\|/,$id); print $code[1]."\n";
The expected output for the above program is "Hello\|Sir" but the actual output is "**Hello**".How do i handle the delimiter preceded by escape sequence using split.
Thank YouIn reply to Splitting the record using the delimiter by mariaprabudass
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |