Hi Monks,
I've been trying out challenges in codeeval and in one of the challenges when i tried to split a string using "|"
delimiter the split function wasn't working as it should.
my $string = 'osSE5Gu0Vi8WRq93UvkYZCjaOKeNJfTyH6tzDQbxFm4M1ndXIPh27wBA
+ rLclpg| 3 35 27 62 51 27 46 57 26 10 46 63 57 45 15 43 53';
my ( $first, $second ) = split ( "|", $string );
say "first:", $first;
say "second:", $second;
Output:
first:o
second:s
what mistake am i making ? I'd expect the first variable to hold the random characters and second to hold the numbers.