Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > split a special character stored in variable

Reply
Thread Tools

split a special character stored in variable

 
 
Ted Zlatanov
Guest
Posts: n/a
 
      04-01-2011
On Fri, ***1 Apr*** 2011 12:29:40 -0700 "ela" <(E-Mail Removed)> wrote:

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.

Ted
 
Reply With Quote
 
 
 
 
ela
Guest
Posts: n/a
 
      04-01-2011
When I enter the character dot .
I find that perl cannot handle properly. It seems that I can't simply escape
add a backslash to escape whatever input delimiter. Is there any solution
for this problem?

$delimiter = <STDIN>;
chomp $delimiter;

@subcells = /$delimiter/, $line;



 
Reply With Quote
 
 
 
 
Joe Smith
Guest
Posts: n/a
 
      04-05-2011
On 2011-04-01 7:08 AM, Ted Zlatanov wrote:
> On Fri, ***1 Apr*** 2011 12:29:40 -0700 "ela"<(E-Mail Removed)> wrote:
>
> e> @subcells = /$delimiter/, $line;
>
> As Perl really, incredibly, lacks full out-of-ligature spacing,


What does "out-of-ligature" spacing mean?

> you can't use the "." character.


Of course you can. ASCII code 46 is a perfectly reasonable delimiter.

> It's a language limitation. You're supposed to use Unicode instead.


What does Unicode have to do with the plain ASCII character for period?

-Joe
 
Reply With Quote
 
Lawrence Statton
Guest
Posts: n/a
 
      04-06-2011
Joe Smith <(E-Mail Removed)> writes:

> On 2011-04-01 7:08 AM, Ted Zlatanov wrote:
>> On Fri, ***1 Apr*** 2011 12:29:40 -0700 "ela"<(E-Mail Removed)> wrote:

***********

>>
>> e> @subcells = /$delimiter/, $line;
>>
>> As Perl really, incredibly, lacks full out-of-ligature spacing,

>
> What does "out-of-ligature" spacing mean?
>
>> you can't use the "." character.

>
> Of course you can. ASCII code 46 is a perfectly reasonable delimiter.
>
>> It's a language limitation. You're supposed to use Unicode instead.

>
> What does Unicode have to do with the plain ASCII character for period?
>
> -Joe


You didn't read the date, did you?

 
Reply With Quote
 
Ted Zlatanov
Guest
Posts: n/a
 
      04-06-2011
On Tue, 05 Apr 2011 11:40:02 -0700 Joe Smith <(E-Mail Removed)> wrote:

JS> On 2011-04-01 7:08 AM, Ted Zlatanov wrote:
>> On Fri, ***1 Apr*** 2011 12:29:40 -0700 "ela"<(E-Mail Removed)> wrote:
>>

e> @subcells = /$delimiter/, $line;
>>
>> As Perl really, incredibly, lacks full out-of-ligature spacing,


JS> What does "out-of-ligature" spacing mean?

It has the first letters "ool" (take the first letters on that line

Ted
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FAQ 4.31 How can I split a [character] delimited string except when inside [character]? PerlFAQ Server Perl Misc 0 04-13-2011 10:00 PM
FAQ 4.31 How can I split a [character] delimited string except when inside [character]? PerlFAQ Server Perl Misc 0 01-25-2011 05:00 AM
How can I split database results with ExecuteReader and Split? needin4mation@gmail.com ASP .Net 2 05-05-2006 10:36 PM
Regarding the special character in Split operator mehul Perl 2 09-19-2004 06:53 PM
Small inconsistency between string.split and "".split Carlos Ribeiro Python 11 09-17-2004 05:57 PM



Advertisments