Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #70141] bug in the split command

0 views
Skip to first unread message

Sean Kelly

unread,
Nov 1, 2009, 3:59:41 AM11/1/09
to bugs-bi...@netlabs.develooper.com
# New Ticket Created by "Sean Kelly"
# Please include the string: [perl #70141]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=70141 >


Hi,
I have found a bug in the perl split command. the following code:
#!/usr/bin/perl
$data=<stdin>;
@inputarray = split(/|/, $data);
print "@inputarray[0] @inputarray[1]";

when you enter: "45|35" #ignore quotes. applys to any numbers or split on any item
it returns "4 5"
not "45 35"

would be interested in hearing back from you,
Thanks,
Sean

Kuldeep Chaturvedi

unread,
Nov 1, 2009, 10:03:41 PM11/1/09
to perl6-c...@perl.org, bugs-bi...@netlabs.develooper.com
Since "|" is a special character, escape it and try. It doesn't look like a bug.

Thanks,
Kuldeep


________________________________
From: Sean Kelly <perl6-bug...@perl.org>
To: bugs-bi...@netlabs.develooper.com
Sent: Sun, November 1, 2009 3:59:41 AM
Subject: [perl #70141] bug in the split command

# New Ticket Created by "Sean Kelly"
# Please include the string: [perl #70141]
# in the subject line of all future correspondence about this issue.

# http://rt.perl.org/rt3/Ticket/Display.html?id=70141 >

0 new messages