in reply to What am I doing wrong with 'split'
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 Section
Seekers of Perl Wisdom
in reply to What am I doing wrong with 'split'
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