Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- split a special character stored in variable
April 1, 2011, 7:29 pm
rate this thread
Re: split a special character stored in variable
e> When I enter the character dot .
e> I find that perl cannot handle properly. It seems that I can't simply escape
e> add a backslash to escape whatever input delimiter. Is there any solution
e> for this problem?
e> $delimiter = <STDIN>;
e> chomp $delimiter;
e> @subcells = /$delimiter/, $line;
As Perl really, incredibly, lacks full out-of-ligature spacing,
you can't use the "." character. It's a language limitation. You're
supposed to use Unicode instead.