dolphin wrote:
Hi,
Hello,
Correct me that the "2" in the following means read?
:
my ( $label, $value ) = split /,/, $line, 2;
The third argument to split determines how many list elements will be
returned. For example, if:
my $line = 'one,two,three,four,five,six,seven';
Then:
split /
From: "dolphin"
Hi,
Correct me that the "2" in the following means read?
:
my ( $label, $value ) = split /,/, $line, 2;
2 means that the result of the split() function will be a list with 2
elements.
You could also use the split() function without that third parameter that
specifies the nu
On Jan 25, 6:43 pm, orasn...@gmail.com ("Octavian Rasnita") wrote:
> From: "dolphin"
>
>
>
>
>
>
>
>
>
> > Hi,
>
> > I'm learning perl now and would like to find out how to perform the
> > following if given in a text file?
>
> > ,12
> > ,437
> > ,124
> > ,45
> > ,789
> > ,
On Tue, Jan 25, 2011 at 2:43 AM, Octavian Rasnita wrote:
> From: "dolphin"
>>
>> Hi,
>>
>> I'm learning perl now and would like to find out how to perform the
>> following if given in a text file?
>>
>>
>> ,12
>> ,437
>> ,124
>> ,45
>> ,789
>> ,67
>> CCC,567
>> DDD,5
>>
>>
From: "dolphin"
Hi,
I'm learning perl now and would like to find out how to perform the
following if given in a text file?
,12
,437
,124
,45
,789
,67
CCC,567
DDD,5
How to sum up the 2nd column based on the 1st column with the
following result:
:
BBB:
CCC:
DDD:
Hi,
I'm learning perl now and would like to find out how to perform the
following if given in a text file?
,12
,437
,124
,45
,789
,67
CCC,567
DDD,5
How to sum up the 2nd column based on the 1st column with the
following result:
:
BBB:
CCC:
DDD:
Thanks in advance