On Mon, Nov 9, 2009 at 8:30 PM, tom smith wrote:
>
> On Mon, Nov 9, 2009 at 10:56 AM, Jim Gibson wrote:
>
>> However, here is a shortened form using regular expression:
>>
>> my @output = $line =~ m{ \G (..) .. }gx;
>>
>> Verify how either of these works when you do not have a multiple of 2
>> c
On Mon, Nov 9, 2009 at 10:56 AM, Jim Gibson wrote:
> However, here is a shortened form using regular expression:
>
> my @output = $line =~ m{ \G (..) .. }gx;
>
> Verify how either of these works when you do not have a multiple of 2
> characters in your input.
>
>
It has other problems too:
use
rithu wrote:
Hi,
Hello,
Please help me to split a string as follows..
my $line = "abcdefghijkl"
the expected output should be like:
ab
ef
ij
The logic is like alternate 2 characters should be removed
$ perl -le'
my $line = "abcdefghijkl";
my @data = unpack "(a2x2)*", $line;
print f
On Mon, Nov 9, 2009 at 7:03 AM, rithu wrote:
> Please help me to split a string as follows..
>
> my $line = "abcdefghijkl"
>
> the expected output should be like:
>
> ab
> ef
> ij
>
>
> The logic is like alternate 2 characters should be removed
>
Will a "for" loop work for your needs? The on
On 11/9/09 Mon Nov 9, 2009 5:03 AM, "rithu"
scribbled:
> Hi,
>
> Please help me to split a string as follows..
>
> my $line = "abcdefghijkl"
>
> the expected output should be like:
>
> ab
> ef
> ij
>
>
> The logic is like alternate 2 characters should be removed
split would not be th