You need to escape your escape.
perl -e '$s="85|mat\@com";$sep="\\\|"; ($key,$email)=split($sep,$s); +print "$key\t$email\n";' 85 mat@com
In reply to Re: What am I doing wrong with 'split'
by rnewsham
in thread What am I doing wrong with 'split'
by flexvault
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |