From: "dolphin" <[email protected]>
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 number of the returned elements:

my ( $label, $value ) = split /,/, $line;

But the first variant is a little bit faster.

Read:

perldoc -f split

Octavian



--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/


Reply via email to